summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorRichard Brežák <richard@brezak.sk>2023-10-24 15:45:21 +0200
committerGitHub <noreply@github.com>2023-10-24 13:45:21 +0000
commit95076f77c1b370ecef780c7bbf631bd34868c982 (patch)
treea0bdf97d0ef58b79a09988f9f4e70fe2fb37e348 /synapse/http
parentRevert "Add test case to detect dodgy b64 encoding" (diff)
downloadsynapse-95076f77c1b370ecef780c7bbf631bd34868c982.tar.xz
Fix http/s proxy authentication with long username/passwords (#16504)
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/connectproxyclient.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/connectproxyclient.py b/synapse/http/connectproxyclient.py
index 636efc33e8..59b914b87e 100644
--- a/synapse/http/connectproxyclient.py
+++ b/synapse/http/connectproxyclient.py
@@ -59,7 +59,7 @@ class BasicProxyCredentials(ProxyCredentials):
             a Proxy-Authorization header.
         """
         # Encode as base64 and prepend the authorization type
-        return b"Basic " + base64.encodebytes(self.username_password)
+        return b"Basic " + base64.b64encode(self.username_password)
 
 
 @attr.s(auto_attribs=True)