mirror of
https://github.com/github/codeql.git
synced 2026-02-28 04:43:42 +01:00
Java: Tighter model of HostnameVerifier#verify
This more tightly models `HostnameVerifier#verify` previously it was possible to accidentally match other methods called `verify`.
This commit is contained in:
@@ -29,13 +29,20 @@ class SSLContext extends RefType {
|
||||
SSLContext() { hasQualifiedName("javax.net.ssl", "SSLContext") }
|
||||
}
|
||||
|
||||
class SSLSession extends RefType {
|
||||
SSLSession() { hasQualifiedName("javax.net.ssl", "SSLSession") }
|
||||
}
|
||||
|
||||
class HostnameVerifier extends RefType {
|
||||
HostnameVerifier() { hasQualifiedName("javax.net.ssl", "HostnameVerifier") }
|
||||
}
|
||||
|
||||
class HostnameVerifierVerify extends Method {
|
||||
HostnameVerifierVerify() {
|
||||
hasName("verify") and getDeclaringType().getASupertype*() instanceof HostnameVerifier
|
||||
hasName("verify") and
|
||||
getDeclaringType().getASupertype*() instanceof HostnameVerifier and
|
||||
getParameterType(0) instanceof TypeString and
|
||||
getParameterType(1) instanceof SSLSession
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user