Skip to content

Commit 0ba229a

Browse files
artem-smotrakovatorralbasmowton
authored
Apply suggestions from code review (typos/formatting)
Co-authored-by: Tony Torralba <[email protected]> Co-authored-by: Chris Smowton <[email protected]>
1 parent f53b2fc commit 0ba229a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

java/ql/src/experimental/Security/CWE/CWE-297/IgnoredHostnameVerification.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<p>
66
The method <code>HostnameVerifier.verify()</code> checks that the hostname from the server's certificate
77
matches the server hostname after an HTTPS connection is established.
8-
The method returns true if the hostname is acceptable and false otherwise. The contract of the method
8+
The method returns <code>true</code> if the hostname is acceptable and <code>false</code> otherwise. The contract of the method
99
does not require it to throw an exception if the verification failed.
1010
Therefore, a caller has to check the result and drop the connection if the hostname verification failed.
1111
Otherwise, an attacker may be able to implement a man-in-the-middle attack and impersonate the server.
@@ -28,7 +28,7 @@ As a result, no hostname verification actually happens.
2828

2929
<p>
3030
In the next example, the result of the <code>HostnameVerifier.verify()</code> method is checked
31-
and an exeption is thrown if the verification failed.
31+
and an exception is thrown if the verification failed.
3232
</p>
3333
<sample src="CheckedHostnameVerification.java" />
3434
</example>

java/ql/src/experimental/Security/CWE/CWE-297/IgnoredHostnameVerification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private class HostnameVerifierVerifyMethod extends Method {
2020
}
2121
}
2222

23-
/** Defines `HostnameVerifier.verity()` calls that is not wrapped in another `HostnameVerifier`. */
23+
/** A `HostnameVerifier.verify()` call that is not wrapped in another `HostnameVerifier`. */
2424
private class HostnameVerificationCall extends MethodAccess {
2525
HostnameVerificationCall() {
2626
this.getMethod() instanceof HostnameVerifierVerifyMethod and

0 commit comments

Comments
 (0)