Skip to content

Commit a006a92

Browse files
committed
Python: Expand commentary
1 parent f22db2a commit a006a92

File tree

1 file changed

+3
-1
lines changed
  • python/ql/src/Security/CWE-327

1 file changed

+3
-1
lines changed

python/ql/src/Security/CWE-327/Ssl.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,15 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext
141141
UnspecificSSLContextCreation() { library = "ssl" }
142142

143143
override ProtocolVersion getUnrestriction() {
144+
// Case: A protocol argument is present.
144145
result = UnspecificContextCreation.super.getUnrestriction() and
145146
// These are turned off by default
146147
// see https://docs.python.org/3/library/ssl.html#ssl-contexts
147148
not result in ["SSLv2", "SSLv3"]
148149
or
149-
// The default argument is TLS and the SSL versions are turned off by default.
150+
// Case: No protocol arguemnt is present.
150151
not exists(this.getProtocol()) and
152+
// The default argument is TLS and the SSL versions are turned off by default.
151153
result in ["TLSv1", "TLSv1_1", "TLSv1_2", "TLSv1_3"]
152154
}
153155
}

0 commit comments

Comments
 (0)