File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1187,13 +1187,13 @@ private module Impl implements RegexTreeViewSig {
1187
1187
or
1188
1188
// TODO: expand to cover more properties
1189
1189
exists ( RegExpNamedCharacterProperty escape | term = escape |
1190
- escape .getName ( ) .toLowerCase ( ) = "digit" and
1190
+ escape .getName ( ) .toLowerCase ( ) = [ "digit" , "isdigit" ] and
1191
1191
if escape .isInverted ( ) then clazz = "D" else clazz = "d"
1192
1192
or
1193
- escape .getName ( ) .toLowerCase ( ) = "space" and
1193
+ escape .getName ( ) .toLowerCase ( ) = [ "space" , "isspace" ] and
1194
1194
if escape .isInverted ( ) then clazz = "S" else clazz = "s"
1195
1195
or
1196
- escape .getName ( ) .toLowerCase ( ) = "word" and
1196
+ escape .getName ( ) .toLowerCase ( ) = [ "word" , "isword" ] and
1197
1197
if escape .isInverted ( ) then clazz = "W" else clazz = "w"
1198
1198
)
1199
1199
}
Original file line number Diff line number Diff line change @@ -535,9 +535,9 @@ func myRegexpVariantsTests(myUrl: URL) throws {
535
535
// GOOD
536
536
_ = try Regex ( #"X(\P{Digit}|7)+Y"# ) . firstMatch ( in: tainted)
537
537
538
- // BAD TODO: we should get this one
538
+ // BAD
539
539
// attack string: "X" + "7" x lots
540
- _ = try Regex ( #"X(\p{IsDigit}|7)*Y"# ) . firstMatch ( in: tainted) // $ MISSING: redos-vulnerable=
540
+ _ = try Regex ( #"X(\p{IsDigit}|7)*Y"# ) . firstMatch ( in: tainted) // $ redos-vulnerable=
541
541
542
542
// GOOD
543
543
_ = try Regex ( #"X(\p{IsDigit}|b)+Y"# ) . firstMatch ( in: tainted)
You can’t perform that action at this time.
0 commit comments