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
redaction: attachment secret check reads raw text only; some escaped, quoted and base64 shapes are shown #996
Found by the second review of #921 round 7. All four are measured on main and are the same at #921's head. The exact inputs are held privately (#707).
The attachment secret check reads only raw text.secretKinds, which the chat attachment refusal uses, matches each pattern on the raw text. It has no glue points and no union with the redactor's shapes. So some secrets that redactString hides (a token glued after a terminal escape or a word prefix, or a credential after a newline) give no kind, and the attachment is stored without the refusal. That it can then be served raw is inferred.
Escaped forms. A bearer token written with JSON-escaped slashes is only partly hidden.
Other-language quoting. A password in a single-quoted dictionary literal is shown in both modes.
Base64 variants of a JWT. JWTs with padding, or with standard-base64 characters, are shown.
Fix, by design:
secretKinds and redactString share one matcher, the same rules applied at the same glue points. The attachment check then can never find less than redaction hides.
Add rows for 2–4 to the redactor's shape tables.
A test should assert that, for every shape the redactor hides, secretKinds is non-empty.
Related: #889 and #921 (shared redactor), and #988.
More shapes of the same class, found by #921 round 8's second review (measured on main and at #921's head; exact inputs held privately). In default mode a password in a URL is shown when the URL has an empty user part, which is the usual form for some services. Also shown on every path: a raw @ or / inside the password, a fully percent-encoded URL, and JSON-escaped slashes. Suggested direction: the default URL rule accepts an empty user, and the user-info part is read up to the last @ before the host.
Activity
jayden1711 commentedon Oct 21, 2026
More shapes of the same class, found by #921 round 8's second review (measured on main and at #921's head; exact inputs held privately). In default mode a password in a URL is shown when the URL has an empty user part, which is the usual form for some services. Also shown on every path: a raw
@or/inside the password, a fully percent-encoded URL, and JSON-escaped slashes. Suggested direction: the default URL rule accepts an empty user, and the user-info part is read up to the last@before the host.test(redact): a glued value with JSON-escaped slashes is hidden from …
test(redact): glue points after a digit, and kinds from a later pass (#…
Merge pull request #1044 from jayden1711/issue-996-redaction-one-matcher