Redaction: known limits
Applies to OpenAny HAR 1.0.6 and later
Redact & save replaces cookies, Authorization, Set-Cookie and API-key headers, tokens in query strings, secret fields in JSON, form and XML bodies, and payment card numbers with [REDACTED]. Headers, cookies and query strings are handled by name. The limits below are inside free text (log lines, scripts, HTML and CSV bodies), where the rules have to guess. Each one is pinned by a test, so any change to it shows.
Redaction never removes personal data such as names, email addresses, phone numbers, postal addresses, IDs inside URL paths or server IP addresses. Read a redacted file before you send it outside your company.
Can still get through
- On a line that is already comma-separated before the secret (
ts=1,password=hun,ter=2), a secret that itself contains,word=is cut at that comma andter=2stays. Taking the rest of the token would take,user=janeoff every structured log line. A secret that starts its own group (login password=hun,ter=2) is hidden whole, unless more than 64 characters follow that comma: in minified code such a run is the rest of the script. - Inside a login region of a page (
<div id="auth">), a secret shaped like an ordinary word (swordfish: letters only) reads exactly likeEmailorSubmitand is left. Anything with a digit, a symbol, mixed-up capitals or more than thirty letters is hidden. - A
text/csvbody with a one-column header over ragged rows, or whose first two lines include one with no comma, and any ragged table served astext/plain, is not read as a table, because a title over two sentences has the same shape. - Key names written in full-width letters (
password:) and|-separated tables are not recognised. - A
=value that runs through a bracket or a backslash into the next pair's key (s= (x)session= hunter2x9). Giving the key back hid 390 more characters of ordinary code on real browser files. - A backtick is not treated as a quote (
session:`hunter2x9`). Treating it as one hid 2.7 KB more and leaked more often. - Three shapes where a quote can be read two ways: a quoted value that runs through the next pair's opening quote, a stray closing quote answered by the next pair's, and a raw U+2028 inside a value. When no quote ever closes such a value it ends at the U+2028 it crossed.
Hidden although it is not a secret (the safe direction)
- A bare
=value takes a closing bracket with it:(token=abc)comes back as(token=[REDACTED]. - An element whose attribute names a secret word other than a page region (
<div id="password-reset">,<section id="cookie-consent">) loses its whole contents. - In a login region, an email address, a date, a price or a one-time code goes with the password.
token=abc,ttl=3600loses,ttl=3600.- Text after an apostrophe that looks like an unclosed quote (
secret: 'tis the season) is hidden to the end of its line. - A notice served as
text/csvwhose lines all contain a comma loses every line under its first. - In a
text/csvtable, a cell among the first five lines that reads as a secret column name (tokenin ascopecolumn) hides that column from there down. - A value still URL-encoded after three decodes is hidden whole.
- A quoted secret whose closing quote has a letter or digit right behind it (
password='a'b) is hidden up to the next quote that closes, or to the end of its line when there is none. - In a script, a string that ends in a secret-looking name and a colon (
"session-resume:") hides the code behind it up to the next closing quote.
Found a shape that leaks? Email support@openany.dev.