File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
swift/ql/test/library-tests/regex Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,12 @@ func myRegexpVariantsTests(myUrl: URL) throws {
380
380
381
381
// BAD
382
382
// TODO: QL evaluation times out (for test, at 5 minutes)
383
+ // times out:
383
384
// _ = 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=
384
389
385
390
// BAD (but cannot currently construct a prefix)
386
391
// attack string: "aa" + "b" x lots + "!"
You can’t perform that action at this time.
0 commit comments