Skip to content

@link-foundation/sensitive-data-sanitizer 0.22.3

Choose a tag to compare

@github-actions github-actions released this 12 Nov 08:48
· 109 commits to main since this release
  • e0864bb: Sanitizing text with one long single-line letter run, such as a base64 blob embedded in a JSONL log, no longer fails with ERR_SANITIZATION on Node.js (#170). The camelCase credential key scan (clientSecret: …) matches the words before the credential word with one character class, which accepts the same keys without a backtracking entry per capital letter, so an 8 MiB or longer AAAA…/AbAb… run no longer overflows V8's regular-expression stack. Separated credential keys (spring.datasource.password, DB_PASSWORD_FILE) and obfuscated e-mail addresses (jane.roe (at) example (dot) org) accept at most 16 separated words or dotted parts on each side, so A_A_… and a.a.a.… runs no longer overflow either, and a a-a-a-… line no longer takes quadratic time (256 KiB took about 100 seconds; it now takes about 40 ms). Wrapped base64 runs (base64 -w, PEM bodies) and percent-encoded runs (%41%41…) are matched line by line and escape by escape, and U+0041 U+0042 … and CSS \41 \42 … escape runs unit by unit, with the same results, so long runs of those no longer overflow the stack either. A WordPress define('AUTH_KEY', '…') value repeats a group only per escape, so a long value is found instead of failing.

Related Pull Request: #171


npm version