Consolidate sanitizers into default sanitizer

This commit is contained in:
Remco Vermeulen
2020-08-05 17:07:05 +02:00
parent 0c09d66d43
commit a1411407c1

View File

@@ -79,14 +79,12 @@ private predicate apacheLdapInjectionSinkMethod(Method m, int index) {
)
}
/** A sanitizer that clears the taint on primitive types. */
private class PrimitiveTypeLdapSanitizer extends LdapInjectionSanitizer {
PrimitiveTypeLdapSanitizer() { this.getType() instanceof PrimitiveType }
}
/** A sanitizer that clears the taint on boxed primitive types. */
private class BoxedTypeLdapSanitizer extends LdapInjectionSanitizer {
BoxedTypeLdapSanitizer() { this.getType() instanceof BoxedType }
/** A sanitizer that clears the taint on (boxed) primitive types */
private class DefaultLdapSanitizer extends LdapInjectionSanitizer {
DefaultLdapSanitizer() {
this.getType() instanceof PrimitiveType or
this.getType() instanceof BoxedType
}
}
/**