Update functions naming

This commit is contained in:
jorgectf
2021-05-07 22:15:51 +02:00
parent 34b8af30ac
commit 6159fbea2b
2 changed files with 17 additions and 17 deletions

View File

@@ -26,7 +26,7 @@ module LDAPQuery {
/** /**
* Gets the argument containing the executed expression. * Gets the argument containing the executed expression.
*/ */
abstract DataFlow::Node getLDAPNode(); abstract DataFlow::Node getQuery();
} }
} }
@@ -44,7 +44,7 @@ class LDAPQuery extends DataFlow::Node {
/** /**
* Gets the argument containing the executed expression. * Gets the argument containing the executed expression.
*/ */
DataFlow::Node getLDAPNode() { result = range.getLDAPNode() } DataFlow::Node getQuery() { result = range.getQuery() }
} }
/** Provides classes for modeling LDAP components escape-related APIs. */ /** Provides classes for modeling LDAP components escape-related APIs. */
@@ -59,7 +59,7 @@ module LDAPEscape {
/** /**
* Gets the argument containing the escaped expression. * Gets the argument containing the escaped expression.
*/ */
abstract DataFlow::Node getEscapeNode(); abstract DataFlow::Node getAnInput();
} }
} }
@@ -77,5 +77,5 @@ class LDAPEscape extends DataFlow::Node {
/** /**
* Gets the argument containing the escaped expression. * Gets the argument containing the escaped expression.
*/ */
DataFlow::Node getEscapeNode() { result = range.getEscapeNode() } DataFlow::Node getAnInput() { result = range.getAnInput() }
} }

View File

@@ -36,7 +36,7 @@ private module LDAP {
* See `LDAP2QueryMethods` * See `LDAP2QueryMethods`
*/ */
private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range { private class LDAP2Query extends DataFlow::CallCfgNode, LDAPQuery::Range {
DataFlow::Node ldapNode; DataFlow::Node ldapQuery;
LDAP2Query() { LDAP2Query() {
exists(DataFlow::AttrRead searchMethod | exists(DataFlow::AttrRead searchMethod |
@@ -45,17 +45,17 @@ private module LDAP {
searchMethod.getObject().getALocalSource() and searchMethod.getObject().getALocalSource() and
searchMethod.getAttributeName() instanceof LDAP2QueryMethods and searchMethod.getAttributeName() instanceof LDAP2QueryMethods and
( (
ldapNode = this.getArg(0) ldapQuery = this.getArg(0)
or or
( (
ldapNode = this.getArg(2) or ldapQuery = this.getArg(2) or
ldapNode = this.getArgByName("filterstr") ldapQuery = this.getArgByName("filterstr")
) )
) )
) )
} }
override DataFlow::Node getLDAPNode() { result = ldapNode } override DataFlow::Node getQuery() { result = ldapQuery }
} }
/** /**
@@ -68,7 +68,7 @@ private module LDAP {
this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall() this = API::moduleImport("ldap").getMember("dn").getMember("escape_dn_chars").getACall()
} }
override DataFlow::Node getEscapeNode() { result = this.getArg(0) } override DataFlow::Node getAnInput() { result = this.getArg(0) }
} }
/** /**
@@ -82,7 +82,7 @@ private module LDAP {
API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall() API::moduleImport("ldap").getMember("filter").getMember("escape_filter_chars").getACall()
} }
override DataFlow::Node getEscapeNode() { result = this.getArg(0) } override DataFlow::Node getAnInput() { result = this.getArg(0) }
} }
} }
@@ -96,7 +96,7 @@ private module LDAP {
* A class to find `ldap3` methods executing a query. * A class to find `ldap3` methods executing a query.
*/ */
private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range { private class LDAP3Query extends DataFlow::CallCfgNode, LDAPQuery::Range {
DataFlow::Node ldapNode; DataFlow::Node ldapQuery;
LDAP3Query() { LDAP3Query() {
exists(DataFlow::AttrRead searchMethod | exists(DataFlow::AttrRead searchMethod |
@@ -105,13 +105,13 @@ private module LDAP {
searchMethod.getObject().getALocalSource() and searchMethod.getObject().getALocalSource() and
searchMethod.getAttributeName() = "search" and searchMethod.getAttributeName() = "search" and
( (
ldapNode = this.getArg(0) or ldapQuery = this.getArg(0) or
ldapNode = this.getArg(1) ldapQuery = this.getArg(1)
) )
) )
} }
override DataFlow::Node getLDAPNode() { result = ldapNode } override DataFlow::Node getQuery() { result = ldapQuery }
} }
/** /**
@@ -129,7 +129,7 @@ private module LDAP {
.getACall() .getACall()
} }
override DataFlow::Node getEscapeNode() { result = this.getArg(0) } override DataFlow::Node getAnInput() { result = this.getArg(0) }
} }
/** /**
@@ -147,7 +147,7 @@ private module LDAP {
.getACall() .getACall()
} }
override DataFlow::Node getEscapeNode() { result = this.getArg(0) } override DataFlow::Node getAnInput() { result = this.getArg(0) }
} }
} }
} }