Skip to content

Commit 051de24

Browse files
committed
change regexpMatch to regexpFind
1 parent a768e93 commit 051de24

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

javascript/ql/src/semmle/javascript/security/UselessUseOfCat.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class UselessCat extends CommandCall {
102102
)
103103
) and
104104
// wildcards, pipes, redirections, other bash features, and multiple files (spaces) are OK.
105-
not getNonCommandConstantString().regexpMatch(".*(\\*|\\||>|<| |\\$|&|,|\\`).*") and
105+
not exists(getNonCommandConstantString().regexpFind("\\*|\\||>|<| |\\$|&|,|\\`", _, _)) and
106106
// Only acceptable option is "encoding", everything else is non-trivial to emulate with fs.readFile.
107107
(
108108
not exists(getOptionsArg())

0 commit comments

Comments
 (0)