File tree 1 file changed +11
-0
lines changed
python-ecosys/requests/requests
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ def request(
101
101
s .connect (ai [- 1 ])
102
102
if proto == "https:" :
103
103
context = tls .SSLContext (tls .PROTOCOL_TLS_CLIENT )
104
+ # TODO: This is a security vulnerability.
105
+ # HTTPS is providing nearly zero security, because of the next
106
+ # line. We disable all the protection against MiTM attacks!
107
+ #
108
+ # I mean... with this configuration, HTTPS still provides
109
+ # protection against passive eavesdropping, so there's that?
110
+ # But with modern network design, and modern attacks, anyone
111
+ # able to passively eavesdrop is almost certainly able to MiTM
112
+ # too. So the safety level is technically not quite zero, but
113
+ # it is very close to zero, and is far less than people using
114
+ # HTTPS expect.
104
115
context .verify_mode = tls .CERT_NONE
105
116
s = context .wrap_socket (s , server_hostname = host )
106
117
s .write (b"%s /%s HTTP/1.0\r \n " % (method , path ))
You can’t perform that action at this time.
0 commit comments