File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
python/ql/src/Security/CWE-327 Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,15 @@ class UnspecificSSLContextCreation extends SSLContextCreation, UnspecificContext
141
141
UnspecificSSLContextCreation ( ) { library = "ssl" }
142
142
143
143
override ProtocolVersion getUnrestriction ( ) {
144
+ // Case: A protocol argument is present.
144
145
result = UnspecificContextCreation .super .getUnrestriction ( ) and
145
146
// These are turned off by default
146
147
// see https://docs.python.org/3/library/ssl.html#ssl-contexts
147
148
not result in [ "SSLv2" , "SSLv3" ]
148
149
or
149
- // The default argument is TLS and the SSL versions are turned off by default .
150
+ // Case: No protocol arguemnt is present .
150
151
not exists ( this .getProtocol ( ) ) and
152
+ // The default argument is TLS and the SSL versions are turned off by default.
151
153
result in [ "TLSv1" , "TLSv1_1" , "TLSv1_2" , "TLSv1_3" ]
152
154
}
153
155
}
You can’t perform that action at this time.
0 commit comments