Skip to content

Commit c1a2e2a

Browse files
committed
JS: Rename to isLikelyCaseSensitiveRegExp
1 parent fd28397 commit c1a2e2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/ql/src/Security/CWE-178/CaseSensitiveMiddlewarePath.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ RegExpCharacterClass getEnclosingClass(RegExpTerm term) {
2727
}
2828

2929
/**
30-
* Holds if `term` distinguishes between upper and lower case letters, assuming the `i` flag is not present.
30+
* Holds if `term` seems to distinguish between upper and lower case letters, assuming the `i` flag is not present.
3131
*/
3232
pragma[inline]
33-
predicate isCaseSensitiveRegExp(RegExpTerm term) {
33+
predicate isLikelyCaseSensitiveRegExp(RegExpTerm term) {
3434
exists(RegExpConstant const |
3535
const = term.getAChild*() and
3636
const.getValue().regexpMatch(".*[a-zA-Z].*") and
@@ -89,7 +89,7 @@ predicate isCaseSensitiveMiddleware(
8989
) and
9090
arg = call.getArgument(0) and
9191
regexp.getAReference().flowsTo(arg) and
92-
isCaseSensitiveRegExp(regexp.getRoot()) and
92+
isLikelyCaseSensitiveRegExp(regexp.getRoot()) and
9393
exists(string flags |
9494
flags = regexp.getFlags() and
9595
not RegExp::isIgnoreCase(flags)

0 commit comments

Comments
 (0)