File CVE-2023-32681.patch of Package python-requests.34009
Index: requests-2.11.1/requests/sessions.py
===================================================================
--- requests-2.11.1.orig/requests/sessions.py
+++ requests-2.11.1/requests/sessions.py
@@ -260,7 +260,9 @@ class SessionRedirectMixin(object):
except KeyError:
username, password = None, None
- if username and password:
+ # urllib3 handles proxy authorization for us in the standard adapter.
+ # Avoid appending this to TLS tunneled requests where it may be leaked.
+ if not scheme.startswith('https') and username and password:
headers['Proxy-Authorization'] = _basic_auth_str(username, password)
return new_proxies