mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Fix singleton set literal
This commit is contained in:
@@ -29,12 +29,12 @@ module NetLdap {
|
||||
|
||||
/** A call that establishes a LDAP Connection */
|
||||
private class NetLdapConnection extends DataFlow::CallNode {
|
||||
NetLdapConnection() { this in [ldap().getAnInstantiation(), ldap().getAMethodCall(["open"])] }
|
||||
NetLdapConnection() { this in [ldap().getAnInstantiation(), ldap().getAMethodCall("open")] }
|
||||
}
|
||||
|
||||
/** A call that constructs a LDAP query */
|
||||
private class NetLdapFilter extends LdapConstruction::Range, DataFlow::CallNode {
|
||||
NetLdapFilter() { this = any(ldap().getMember("Filter").getAMethodCall(["eq"])) }
|
||||
NetLdapFilter() { this = any(ldap().getMember("Filter").getAMethodCall("eq")) }
|
||||
|
||||
override DataFlow::Node getQuery() { result = this.getArgument([0, 1]) }
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ module LdapInjection {
|
||||
exists(DataFlow::CallNode filterCall |
|
||||
(
|
||||
filterCall =
|
||||
API::getTopLevelMember("Net").getMember("LDAP").getMember("Filter").getAMethodCall(["eq"]) or
|
||||
filterCall.getMethodName() = ["[]"]
|
||||
API::getTopLevelMember("Net").getMember("LDAP").getMember("Filter").getAMethodCall("eq") or
|
||||
filterCall.getMethodName() = "[]"
|
||||
) and
|
||||
n1 = filterCall.getArgument([0, 1]) and
|
||||
n2 = filterCall
|
||||
@@ -64,5 +64,6 @@ module LdapInjection {
|
||||
* sanitizer-guard.
|
||||
*/
|
||||
private class StringConstArrayInclusionCallAsSanitizer extends Sanitizer,
|
||||
StringConstArrayInclusionCallBarrier { }
|
||||
StringConstArrayInclusionCallBarrier
|
||||
{ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user