File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1187,13 +1187,13 @@ private module Impl implements RegexTreeViewSig {
11871187 or
11881188 // TODO: expand to cover more properties
11891189 exists ( RegExpNamedCharacterProperty escape | term = escape |
1190- escape .getName ( ) .toLowerCase ( ) = "digit" and
1190+ escape .getName ( ) .toLowerCase ( ) = [ "digit" , "isdigit" ] and
11911191 if escape .isInverted ( ) then clazz = "D" else clazz = "d"
11921192 or
1193- escape .getName ( ) .toLowerCase ( ) = "space" and
1193+ escape .getName ( ) .toLowerCase ( ) = [ "space" , "isspace" ] and
11941194 if escape .isInverted ( ) then clazz = "S" else clazz = "s"
11951195 or
1196- escape .getName ( ) .toLowerCase ( ) = "word" and
1196+ escape .getName ( ) .toLowerCase ( ) = [ "word" , "isword" ] and
11971197 if escape .isInverted ( ) then clazz = "W" else clazz = "w"
11981198 )
11991199 }
Original file line number Diff line number Diff line change @@ -535,9 +535,9 @@ func myRegexpVariantsTests(myUrl: URL) throws {
535535 // GOOD
536536 _ = try Regex ( #"X(\P{Digit}|7)+Y"# ) . firstMatch ( in: tainted)
537537
538- // BAD TODO: we should get this one
538+ // BAD
539539 // 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=
541541
542542 // GOOD
543543 _ = try Regex ( #"X(\p{IsDigit}|b)+Y"# ) . firstMatch ( in: tainted)
You can’t perform that action at this time.
0 commit comments