Userinfo is everything before the last @ of the authority, which ends at / ? # backslash, quotes,
brackets, angle brackets or ASCII whitespace; a path @ (github.com/@user, pkg@1.2.3, a//b@c) is left
alone, non-ASCII stays inside userinfo. Protocol-relative // opens an authority only at a word start.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
NBSP, U+2028 and other Unicode whitespace stay inside userinfo, so a secret holding them is redacted whole.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Candidate run is everything to the next whitespace, userinfo up to its last @; protocol-relative
// and the narrow word:secret@host.tld/ shape are covered; scanning no longer slices inside a
multibyte character. persona::structured_output redacts each string through the same function.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One function, redact_url_userinfo, owned by result_text: the journal line and the admitted
PipelineReply both read the result through it, and redaction runs before the reply is chunked.
scheme://user:tok@h and http(s)/ftp(s)://tok@h become scheme://<redacted>@h; ssh://git@h stays.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>