From 8fdad3cbba61d529fa9b69a1a136ad6ccf0d388e Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 28 Jan 2024 06:47:34 +0100 Subject: [PATCH] CommonClient: handle Firefox removing the password part of userinfo --- CommonClient.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CommonClient.py b/CommonClient.py index 736cf4922f40..ee8159197b57 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -612,6 +612,10 @@ async def server_loop(ctx: CommonContext, address: typing.Optional[str] = None) address = f"ws://{address}" if "://" not in address \ else address.replace("archipelago://", "ws://") + uri = urllib.parse.urlparse(address) + if uri.username and uri.password is None: + # Fix for Firefox stripping empty password https://bugzilla.mozilla.org/show_bug.cgi?id=1876952 + address = address.replace("@", ":@") server_url = urllib.parse.urlparse(address) if server_url.username: