mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
🩹 fix: PII filter UX gaps surfaced by Copilot review
The pendingEvents replay path in useResumableSSE was dispatching pii_matches events through contentHandler instead of piiMatchesHandler, so a warn-mode toast would silently fail when the subscriber connected after the event was buffered. Added the missing branch alongside the existing live-stream check. The starterPatterns comment in librechat.example.yaml claimed an omitted field enables all five starter ids, but the default actually selects only the low-false-positive set (sk_prefix, bearer_header, api_key_header). The query-param patterns (api_key_query, key_query) require explicit opt-in. Rewrote the comment to match the resolver in selectStarterPatterns.
This commit is contained in:
parent
92385d5e51
commit
eddb31853e
2 changed files with 8 additions and 4 deletions
|
|
@ -702,6 +702,8 @@ export default function useResumableSSE(
|
|||
titleHandler(pendingEvent);
|
||||
} else if (pendingEvent.event != null) {
|
||||
stepHandler(pendingEvent, resumeSubmission);
|
||||
} else if (pendingEvent.type === 'pii_matches') {
|
||||
piiMatchesHandler(pendingEvent);
|
||||
} else if (pendingEvent.type != null) {
|
||||
contentHandler({ data: pendingEvent, submission: resumeSubmission });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -786,10 +786,12 @@ endpoints:
|
|||
# onMatch: warn
|
||||
#
|
||||
# # Starter patterns ported from danny-avila/LibreChat#13561's winston log
|
||||
# # redaction. Omit the field to enable all 5; pass an empty list to enable
|
||||
# # none and rely entirely on customPatterns.
|
||||
# # Available ids: sk_prefix, bearer_header, api_key_header, api_key_query, key_query
|
||||
# starterPatterns: [sk_prefix, bearer_header, api_key_header, api_key_query, key_query]
|
||||
# # redaction. Omit the field to enable the low-false-positive default set
|
||||
# # (sk_prefix, bearer_header, api_key_header). Pass an explicit list to
|
||||
# # subset the default set or to opt in to the higher-false-positive query
|
||||
# # patterns (api_key_query, key_query); pass an empty list to disable
|
||||
# # starters entirely and rely on customPatterns alone.
|
||||
# starterPatterns: [sk_prefix, bearer_header, api_key_header]
|
||||
#
|
||||
# # Operator-defined regex additions. Each entry needs a stable id (used in
|
||||
# # logs and the SSE payload), a human-readable label (shown to users in the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue