Skip to content

Commit 2a8b37e

Browse files
erik-kroghesbena
andauthored
update consistency comments in unsafe-jquery-plugin.js
Co-authored-by: Esben Sparre Andreasen <esbena@github.com>
1 parent c986f3b commit 2a8b37e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/ql/test/query-tests/Security/CWE-079/unsafe-jquery-plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@
152152

153153
$.fn.my_plugin = function my_plugin(options) {
154154
let target = options.target;
155-
target === DEFAULTS.target? $(target): $(document).find(target); // NOT OK - but not flagged [INCONSISTENCY]
156-
options.target === DEFAULTS.target? $(options.target): $(document).find(options.target); // NOT OK - but not flagged [INCONSISTENCY]
155+
target === DEFAULTS.target? $(target): $(document).find(target); // OK
156+
options.target === DEFAULTS.target? $(options.target): $(document).find(options.target); // OK
157157
options.targets.a === DEFAULTS.target? $(options.target.a): $(document).find(options.target.a); // OK - but still flagged [INCONSISTENCY]
158158
}
159159

0 commit comments

Comments
 (0)