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

Commit

Permalink
Fix TLS when using the ProxyAgent
Browse files Browse the repository at this point in the history
Same fix as #15746

Thanks to @realtyem for pointing it out!

`creatorForNetloc(...)` doesn't come with typing and expects `host`
to be `bytes` instead of a `str`.

`ProxyAgent` was introduced with the federation outbound proxy:
#15773
  • Loading branch information
MadLittleMods committed Jul 10, 2023
1 parent 06107b8 commit f067e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/http/proxyagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __init__(

if federation_proxy.tls:
tls_connection_creator = self._policy_for_https.creatorForNetloc(
federation_proxy.host,
federation_proxy.host.encode("utf-8"),
federation_proxy.port,
)
endpoint = wrapClientTLS(tls_connection_creator, endpoint)
Expand Down

0 comments on commit f067e6a

Please sign in to comment.