Skip to content

Commit d37d922

Browse files
committed
Java: Fix Typos
1 parent 030c286 commit d37d922

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

java/ql/src/Security/CWE/CWE-295/InsecureTrustManager.ql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import DataFlow::PathGraph
1919

2020
/**
2121
* Models an insecure `X509TrustManager`.
22-
* An `X509TrustManager` is considered insecure if it never throws a `CertificatException` thereby accepting any certificate as valid.
22+
* An `X509TrustManager` is considered insecure if it never throws a `CertificateException` thereby accepting any certificate as valid.
2323
*/
2424
class InsecureX509TrustManager extends RefType {
2525
InsecureX509TrustManager() {
@@ -33,26 +33,26 @@ class InsecureX509TrustManager extends RefType {
3333
}
3434

3535
/** The `java.security.cert.CertificateException` class. */
36-
private class CertificatException extends RefType {
37-
CertificatException() { hasQualifiedName("java.security.cert", "CertificateException") }
36+
private class CertificateException extends RefType {
37+
CertificateException() { hasQualifiedName("java.security.cert", "CertificateException") }
3838
}
3939

4040
/**
41-
*Holds if:
42-
* - `m` may `throw` an `CertificatException`
41+
* Holds if:
42+
* - `m` may `throw` a `CertificateException`
4343
* - `m` calls another method that may throw
44-
* - `m` calls a method that declares to throw an `CertificatExceptio`, but for which no source is available
44+
* - `m` calls a method declared to throw a `CertificateException`, but for which no source is available
4545
*/
4646
private predicate mayThrowCertificateException(Method m) {
4747
exists(Stmt stmt | m.getBody().getAChild*() = stmt |
48-
stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificatException
48+
stmt.(ThrowStmt).getThrownExceptionType().getASupertype*() instanceof CertificateException
4949
)
5050
or
5151
exists(Method otherMethod | m.polyCalls(otherMethod) |
5252
mayThrowCertificateException(otherMethod)
5353
or
5454
not otherMethod.fromSource() and
55-
otherMethod.getAnException().getType().getASupertype*() instanceof CertificatException
55+
otherMethod.getAnException().getType().getASupertype*() instanceof CertificateException
5656
)
5757
}
5858

0 commit comments

Comments
 (0)