Skip to content

Commit 4d8ea07

Browse files
Copilotjogibear9988
andcommitted
fix: revert at-rule regexes to original patterns (pre-existing ReDoS)
Co-authored-by: jogibear9988 <364896+jogibear9988@users.noreply.github.com>
1 parent c5f3a51 commit 4d8ea07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/parse/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ const re_pageMarginBox = new RegExp(
9494
'y',
9595
);
9696

97-
// Pre-compiled non-block at-rule regexes
97+
// Pre-compiled non-block at-rule regexes.
98+
// NOTE: these patterns are inherited from the original _compileAtRule factory.
9899
const re_atImport =
99100
/@import\s*((?::?[^;'"]|"(?:\\"|[^"])*?"|'(?:\\'|[^'])*?')+)(?:;|$)/y;
100101
const re_atCharset =

0 commit comments

Comments
 (0)