Skip to content

Commit 4d1f783

Browse files
committed
JS: Check for [^.]
1 parent a7a90b4 commit 4d1f783

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

javascript/ql/src/Security/CWE-020/HostnameRegexpShared.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ predicate isDotConstant(RegExpTerm term) {
1818
or
1919
exists(RegExpCharacterClass cls |
2020
term = cls and
21+
not cls.isInverted() and
2122
cls.getNumChild() = 1 and
2223
cls.getAChild().(RegExpConstant).getValue() = "."
2324
)

0 commit comments

Comments
 (0)