mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibRegex: Disallow duplicate named capture groups in ECMA262 parser
This commit is contained in:
parent
be3b806487
commit
733a70671b
Notes:
sideshowbarker
2024-07-17 22:31:10 +09:00
Author: https://github.com/davidot
Commit: 733a70671b
Pull-request: https://github.com/SerenityOS/serenity/pull/11316
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg ✅
4 changed files with 11 additions and 0 deletions
|
@ -591,6 +591,8 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "a{9007199254740991,9007199254740992}"sv, regex::Error::InvalidBraceContent },
|
||||
{ "a{9007199254740992,9007199254740991}"sv, regex::Error::InvalidBraceContent },
|
||||
{ "a{9007199254740992,9007199254740992}"sv, regex::Error::InvalidBraceContent },
|
||||
{ "(?<a>a)(?<a>b)"sv, regex::Error::DuplicateNamedCapture },
|
||||
{ "(?<a>a)(?<b>b)(?<a>c)"sv, regex::Error::DuplicateNamedCapture },
|
||||
};
|
||||
|
||||
for (auto& test : tests) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue