File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
javascript/ql/src/Security/CWE-178 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ RegExpCharacterClass getEnclosingClass(RegExpTerm term) {
27
27
}
28
28
29
29
/**
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.
31
31
*/
32
32
pragma [ inline]
33
- predicate isCaseSensitiveRegExp ( RegExpTerm term ) {
33
+ predicate isLikelyCaseSensitiveRegExp ( RegExpTerm term ) {
34
34
exists ( RegExpConstant const |
35
35
const = term .getAChild * ( ) and
36
36
const .getValue ( ) .regexpMatch ( ".*[a-zA-Z].*" ) and
@@ -89,7 +89,7 @@ predicate isCaseSensitiveMiddleware(
89
89
) and
90
90
arg = call .getArgument ( 0 ) and
91
91
regexp .getAReference ( ) .flowsTo ( arg ) and
92
- isCaseSensitiveRegExp ( regexp .getRoot ( ) ) and
92
+ isLikelyCaseSensitiveRegExp ( regexp .getRoot ( ) ) and
93
93
exists ( string flags |
94
94
flags = regexp .getFlags ( ) and
95
95
not RegExp:: isIgnoreCase ( flags )
You can’t perform that action at this time.
0 commit comments