Skip to content

Commit a141140

Browse files
committed
Consolidate sanitizers into default sanitizer
1 parent 0c09d66 commit a141140

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

java/ql/src/semmle/code/java/security/LdapInjection.qll

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,12 @@ private predicate apacheLdapInjectionSinkMethod(Method m, int index) {
7979
)
8080
}
8181

82-
/** A sanitizer that clears the taint on primitive types. */
83-
private class PrimitiveTypeLdapSanitizer extends LdapInjectionSanitizer {
84-
PrimitiveTypeLdapSanitizer() { this.getType() instanceof PrimitiveType }
85-
}
86-
87-
/** A sanitizer that clears the taint on boxed primitive types. */
88-
private class BoxedTypeLdapSanitizer extends LdapInjectionSanitizer {
89-
BoxedTypeLdapSanitizer() { this.getType() instanceof BoxedType }
82+
/** A sanitizer that clears the taint on (boxed) primitive types */
83+
private class DefaultLdapSanitizer extends LdapInjectionSanitizer {
84+
DefaultLdapSanitizer() {
85+
this.getType() instanceof PrimitiveType or
86+
this.getType() instanceof BoxedType
87+
}
9088
}
9189

9290
/**

0 commit comments

Comments
 (0)