Files
wekan/models
Lauri Ojansivu cc4a494185 Fix CodeQL alerts #609 and #610: a OneNote page's removals are one replace.
The fix for #606 put the four removals - head/style/script elements,
comments, declarations, processing instructions - in one fixed-point loop,
but as a chain, x = x.replace(A).replace(B)...; CodeQL exempts a removal
only when its own result flows back into it, so the value between two
removals counted as unsanitized ("may still contain <!--", "<script").
Four assignments in a row were no better, checked with CodeQL 2.27.5. The
patterns are now one regex of alternatives in the loop: CodeQL reports
nothing. A declaration is <![^<>]*> so it cannot swallow the start of a
comment after a stray <!-, which the splice test caught.

tests/tagStrippingFixedPoint.test.cjs accepted the chain, which is how this
got through. It now accepts only the shape CodeQL exempts - prev = x; and
one x = x.replace(...); in the loop - flags the old OneNote lines 65 and
66 exactly, and has fixtures for a chain, several assignments and one
replace of alternatives.

Thanks to GitHub CodeQL and xet7 !
2026-11-21 13:22:24 +02:00
..
2026-11-20 09:16:10 +02:00
2026-10-14 13:15:39 +03:00
2026-11-20 09:16:10 +02:00
2026-06-12 20:15:56 +03:00