[common] disable Authorization header injection from .netrc auth

(#6134, #6455)
This commit is contained in:
Mike Fährmann
2024-11-15 17:15:10 +01:00
parent a3dbc58172
commit 0a72a5009c

View File

@@ -1004,6 +1004,12 @@ SSL_CIPHERS = {
}
# disable Basic Authorization header injection from .netrc data
try:
requests.sessions.get_netrc_auth = lambda _: None
except Exception:
pass
# detect brotli support
try:
BROTLI = urllib3.response.brotli is not None