File tree Expand file tree Collapse file tree
swift/ql/test/library-tests/regex Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -380,7 +380,12 @@ func myRegexpVariantsTests(myUrl: URL) throws {
380380
381381 // BAD
382382 // TODO: QL evaluation times out (for test, at 5 minutes)
383+ // times out:
383384// _ = try Regex(#"(\w*foobarbaz\w*foobarbaz\w*foobarbaz\w*foobarbaz\s*foobarbaz\d*foobarbaz\w*)+-"#).firstMatch(in: tainted) // $ redos-vulnerable=
385+ // a simpler regex that times out:
386+ // _ = try Regex(#"(\w*foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar)+"#).firstMatch(in: tainted) // $ redos-vulnerable=
387+ // a simpler regerx that doesn't time out but is slow to evaluate:
388+ // _ = try Regex(#"(\w*foobarfoobarfoobar)+"#).firstMatch(in: tainted) // $ redos-vulnerable=
384389
385390 // BAD (but cannot currently construct a prefix)
386391 // attack string: "aa" + "b" x lots + "!"
You can’t perform that action at this time.
0 commit comments