Skip to content

Commit e87b8ba

Browse files
committed
Java: Make the barrier in java/potentially-weak-cryptographic-algorithm less restrictive.
1 parent 1c64fb1 commit e87b8ba

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

java/ql/lib/semmle/code/java/security/MaybeBrokenCryptoAlgorithmQuery.qll

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ private predicate objectToString(MethodAccess ma) {
3434
)
3535
}
3636

37-
private class StringContainer extends RefType {
38-
StringContainer() {
39-
this instanceof TypeString or
40-
this instanceof StringBuildingType or
41-
this.hasQualifiedName("java.util", "StringTokenizer") or
42-
this.(Array).getComponentType() instanceof StringContainer
43-
}
44-
}
45-
4637
/**
4738
* A taint-tracking configuration to reason about the use of potentially insecure cryptographic algorithms.
4839
*/
@@ -53,7 +44,7 @@ module InsecureCryptoConfig implements DataFlow::ConfigSig {
5344

5445
predicate isBarrier(DataFlow::Node n) {
5546
objectToString(n.asExpr()) or
56-
not n.getType().getErasure() instanceof StringContainer
47+
n.getType().getErasure() instanceof TypeObject
5748
}
5849
}
5950

0 commit comments

Comments
 (0)