Skip to content

Commit b2745d4

Browse files
committed
Ruby: update ReDoS.expected
1 parent 61fa3ba commit b2745d4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ruby/ql/test/query-tests/security/cwe-1333-exponential-redos/ReDoS.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
| tst.rb:74:10:74:17 | (b\|a?b)* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'b'. |
2121
| tst.rb:77:10:77:17 | (a\|aa?)* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
2222
| tst.rb:83:10:83:16 | (.\|\\n)* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '\\n'. |
23+
| tst.rb:89:21:89:28 | (a\|aa?)* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'. |
2324
| tst.rb:95:11:95:24 | ([\\S\\s]\|[^a])* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '`'. |
2425
| tst.rb:101:11:101:19 | (.\|[^a])* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '`'. |
2526
| tst.rb:107:11:107:19 | (b\|[^a])* | This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'b'. |

ruby/ql/test/query-tests/security/cwe-1333-exponential-redos/tst.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
# GOOD
8686
good8 = /([\w.]+)*/
8787

88-
# BAD - we don't yet parse regexps constructed from strings
88+
# NOT GOOD
8989
bad17 = Regexp.new '(a|aa?)*b'
9090

9191
# GOOD - not used as regexp

0 commit comments

Comments
 (0)