Skip to content

Commit 03c2a0e

Browse files
Add missing qldoc
1 parent 0d09484 commit 03c2a0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1+
/** Defintions for the web view certificate validation query */
2+
13
import java
24

5+
/** A method that overrides `WebViewClient.onReceivedSslError` */
36
class OnReceivedSslErrorMethod extends Method {
47
OnReceivedSslErrorMethod() {
58
this.overrides*(any(Method m |
69
m.hasQualifiedName("android.webkit", "WebViewClient", "onReceivedSslError")
710
))
811
}
912

13+
/** Gets the `SslErrorHandler` argument to this method. */
1014
Parameter handlerArg() { result = this.getParameter(1) }
1115
}
1216

17+
/** A call to `SslErrorHandler.cancel` */
1318
private class SslCancelCall extends MethodAccess {
1419
SslCancelCall() {
1520
this.getMethod().hasQualifiedName("android.webkit", "SslErrorHandler", "cancel")
1621
}
1722
}
1823

24+
/** A call to `SslErrorHandler.proceed` */
1925
private class SslProceedCall extends MethodAccess {
2026
SslProceedCall() {
2127
this.getMethod().hasQualifiedName("android.webkit", "SslErrorHandler", "proceed")
2228
}
2329
}
2430

31+
/** Holds if `m` trusts all certifiates by calling `SslErrorHandler.proceed` unconditionally. */
2532
predicate trustsAllCerts(OnReceivedSslErrorMethod m) {
2633
exists(SslProceedCall pr | pr.getQualifier().(VarAccess).getVariable() = m.handlerArg()) and
2734
not exists(SslCancelCall ca | ca.getQualifier().(VarAccess).getVariable() = m.handlerArg())

0 commit comments

Comments
 (0)