You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d645927
Browse filesBrowse the repository at this point in the historyBrowse files
fix(pii): stop one half-emoji from failing log redaction (#8867)
* fix(pii): stop one half-emoji from failing log redaction
A lone UTF-16 surrogate (e.g. an emoji cut by display truncation) made
Presidio fail encoding its /redact_batch response, so mask-batch answered
500, each chunk was retried 8 times, and the default scrub mode replaced
every string in the execution log with [REDACTION_FAILED].
- validate_pii: every string sent to Presidio goes out well-formed
(toWellFormed, length-preserving U+FFFD); Presidio 4xx (other than
408/429) becomes PiiServiceRejectedError, unreachable / 502-504 becomes
PiiServiceUnavailableError
- mask-batch route: rejected -> 422 (never resent), unavailable -> 503
- mask client: optional failedChunkPlaceholder scrubs only the failed
chunk and reports scrubbedCount; an outage (connection error or
502/503/504) stops sending queued chunks, a 500 does not
- pii-redaction: scrub mode uses it and logs scrubbedCount, so one bad
chunk no longer erases the whole payload; throw mode is unchanged
- display-filters: truncate on a code-point boundary with an exact count
- Presidio: any unencodable string in a request body is a 422, and 422
bodies no longer echo request input
* test(pii): assert the outage breaker through masked output, not request counts
* refactor(pii): drop unused error status, exports, and dead 422 escaping
0 commit comments