Skip to content

Commit d07c71c

Browse files
committed
unlimited repetition of a wildcard is also a wildcard
1 parent 160fa14 commit d07c71c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

javascript/ql/src/semmle/javascript/Regexp.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,12 @@ module RegExp {
10781078
not cls.isInverted() and
10791079
cls.getAChild().(RegExpCharacterClassEscape).getValue().isUppercase()
10801080
)
1081+
or
1082+
// an unlimited number of wildcards, is also a wildcard.
1083+
exists(InfiniteRepetitionQuantifier q |
1084+
term = q and
1085+
isWildcardLike(q.getAChild())
1086+
)
10811087
}
10821088

10831089
/**

0 commit comments

Comments
 (0)