Skip to content

Commit d9a0dc0

Browse files
committed
Remove check for console().getAMethodCall
1 parent 65eba02 commit d9a0dc0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

javascript/ql/src/experimental/Security/CWE-117/LogInjection.qll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ module LogInjection {
6565
*/
6666
class LoggingCall extends DataFlow::CallNode {
6767
LoggingCall() {
68-
this = any(ConsoleSource console).getAMemberCall(getAStandardLoggerMethodName())
69-
or
7068
exists(DataFlow::SourceNode node, string propName |
7169
any(ConsoleSource console).getAPropertyRead() = node.getAPropertySource(propName) and
7270
this = node.getAPropertyRead(propName).getACall()
@@ -88,9 +86,7 @@ module LogInjection {
8886
*/
8987
class StringReplaceSanitizer extends Sanitizer {
9088
StringReplaceSanitizer() {
91-
exists(string s |
92-
this.(StringReplaceCall).replaces(s, "") and s.regexpMatch("\\n")
93-
)
89+
exists(string s | this.(StringReplaceCall).replaces(s, "") and s.regexpMatch("\\n"))
9490
}
9591
}
9692

0 commit comments

Comments
 (0)