Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix http/s proxy authentication
Browse files Browse the repository at this point in the history
Signed-off-by: magic_rb <[email protected]>
  • Loading branch information
MagicRB committed Oct 20, 2023
1 parent 7291c68 commit 446f012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/16504.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix http/s forward proxy authentication not working.
4 changes: 3 additions & 1 deletion synapse/http/connectproxyclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ def as_proxy_authorization_value(self) -> bytes:
a Proxy-Authorization header.
"""
# Encode as base64 and prepend the authorization type
return b"Basic " + base64.encodebytes(self.username_password)
return b"Basic " + base64.encodebytes(self.username_password).replace(
b'\n', b''
)


@attr.s(auto_attribs=True)
Expand Down

0 comments on commit 446f012

Please sign in to comment.