We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b9b4a1 commit 05939bdCopy full SHA for 05939bd
swift/ql/test/library-tests/regex/redos_variants.swift
@@ -500,6 +500,13 @@ func myRegexpVariantsTests(myUrl: URL) throws {
500
// GOOD
501
_ = try Regex(#"X(\u0061|b)+Y"#).firstMatch(in: tainted)
502
503
+ // BAD
504
+ // attack string: "X" + "a" x lots
505
+ _ = try Regex(#"X(\U00000061|a)*Y"#).firstMatch(in: tainted) // $ MISSING: redos-vulnerable=
506
+
507
+ // GOOD
508
+ _ = try Regex(#"X(\U00000061|b)+Y"#).firstMatch(in: tainted)
509
510
// BAD TODO: we should get this one
511
// attack string: "X" + "a" x lots
512
_ = try Regex(#"X(\x61|a)*Y"#).firstMatch(in: tainted) // $ MISSING: redos-vulnerable=
0 commit comments