Files
Elian DoranandClaude Opus 5.5 0ab8cede1d fix(clipper): look for a tag in linear time
`processContent()` wraps content that holds no tag in a paragraph, and
tested for a tag with `/<.+?>/`. CodeQL flags it as a polynomial ReDoS:
on a string of `<` with no `>`, each start position scans to the end
(1.4 s for 100,000 characters in Node). `/<[^<>]+>/` stops each attempt
at the next `<`, so the scan is linear (under 1 ms).

The input is the output of `sanitizeHtml()`, which escapes a stray `<`
to `&lt;`, so the slow case was most likely unreachable from the route;
no spec through `processContent()` can tell the two patterns apart.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-11 13:00:18 +03:00
..
2026-10-11 04:22:16 +00:00