Skip to content

Commit 15562e4

Browse files
committed
Update LdapjsSearchOptions
1 parent e2e5545 commit 15562e4

File tree

1 file changed

+9
-1
lines changed
  • javascript/ql/src/experimental/Security/CWE-090

1 file changed

+9
-1
lines changed

javascript/ql/src/experimental/Security/CWE-090/Ldapjs.qll

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,17 @@ module Ldapjs {
3333
* Gets a data flow node for the client `search` options.
3434
*/
3535
class LdapjsSearchOptions extends DataFlow::SourceNode {
36+
DataFlow::CallNode queryCall;
37+
3638
LdapjsSearchOptions() {
37-
this = any(LdapjsClient client).getAMemberCall("search").getArgument(1).getALocalSource()
39+
queryCall = any(LdapjsClient client).getAMemberCall("search") and
40+
this = queryCall.getArgument(1).getALocalSource()
3841
}
42+
43+
/**
44+
* Gets the LDAP query call that these options are used in.
45+
*/
46+
DataFlow::InvokeNode getQueryCall() { result = queryCall }
3947
}
4048

4149
/**

0 commit comments

Comments
 (0)