Skip to content

Commit 316117f

Browse files
committed
C++: Reduce number of regexps.
1 parent 2f09f0e commit 316117f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ predicate hardCodedAddressOrIP(StringLiteral txt) {
3434
s.matches("\"www.%\"") or
3535
s.matches("\"http:%\"") or
3636
s.matches("\"https:%\"") or
37-
s.regexpMatch("\".*\\." + getATopLevelDomain() + "\"")
37+
s.regexpMatch("\".*\\.(" + concat(getATopLevelDomain(), "|") + ")\"")
3838
)
3939
}
4040

0 commit comments

Comments
 (0)