@@ -443,41 +443,6 @@ module RegexExecution {
443443 }
444444}
445445
446- /**
447- * A data-flow node that executes an LDAP query.
448- *
449- * Extend this class to refine existing API models. If you want to model new APIs,
450- * extend `LDAPQuery::Range` instead.
451- */
452- class LdapExecution extends DataFlow:: Node {
453- LdapExecution:: Range range ;
454-
455- LdapExecution ( ) { this = range }
456-
457- /** Gets the argument containing the filter string. */
458- DataFlow:: Node getFilter ( ) { result = range .getFilter ( ) }
459-
460- /** Gets the argument containing the base DN. */
461- DataFlow:: Node getBaseDn ( ) { result = range .getBaseDn ( ) }
462- }
463-
464- /** Provides classes for modeling new LDAP query execution-related APIs. */
465- module LdapExecution {
466- /**
467- * A data-flow node that executes an LDAP query.
468- *
469- * Extend this class to model new APIs. If you want to refine existing API models,
470- * extend `LDAPQuery` instead.
471- */
472- abstract class Range extends DataFlow:: Node {
473- /** Gets the argument containing the filter string. */
474- abstract DataFlow:: Node getFilter ( ) ;
475-
476- /** Gets the argument containing the base DN. */
477- abstract DataFlow:: Node getBaseDn ( ) ;
478- }
479- }
480-
481446/**
482447 * A data-flow node that escapes meta-characters, which could be used to prevent
483448 * injection attacks.
@@ -535,20 +500,8 @@ module Escaping {
535500 /** Gets the escape-kind for escaping a string so it can safely be included in HTML. */
536501 string getHtmlKind ( ) { result = "html" }
537502
538- /** Gets the escape-kind for escaping a string so it can safely be included in a regular expression . */
503+ /** Gets the escape-kind for escaping a string so it can safely be included in HTML . */
539504 string getRegexKind ( ) { result = "regex" }
540-
541- /**
542- * Gets the escape-kind for escaping a string so it can safely be used as a
543- * distinguished name (DN) in an LDAP search.
544- */
545- string getLdapDnKind ( ) { result = "ldap_dn" }
546-
547- /**
548- * Gets the escape-kind for escaping a string so it can safely be used as a
549- * filter in an LDAP search.
550- */
551- string getLdapFilterKind ( ) { result = "ldap_filter" }
552505 // TODO: If adding an XML kind, update the modeling of the `MarkupSafe` PyPI package.
553506 //
554507 // Technically it claims to escape for both HTML and XML, but for now we don't have
@@ -573,21 +526,6 @@ class RegexEscaping extends Escaping {
573526 RegexEscaping ( ) { range .getKind ( ) = Escaping:: getRegexKind ( ) }
574527}
575528
576- /**
577- * An escape of a string so it can be safely used as a distinguished name (DN)
578- * in an LDAP search.
579- */
580- class LdapDnEscaping extends Escaping {
581- LdapDnEscaping ( ) { range .getKind ( ) = Escaping:: getLdapDnKind ( ) }
582- }
583-
584- /**
585- * An escape of a string so it can be safely used as a filter in an LDAP search.
586- */
587- class LdapFilterEscaping extends Escaping {
588- LdapFilterEscaping ( ) { range .getKind ( ) = Escaping:: getLdapFilterKind ( ) }
589- }
590-
591529/** Provides classes for modeling HTTP-related APIs. */
592530module HTTP {
593531 import semmle.python.web.HttpConstants
0 commit comments