Archipelago
Archipelago copied to clipboard
CommonClient: handle Firefox removing the password part of userinfo
What is this fixing or adding?
Firefox's mistake More details in https://discord.com/channels/731205301247803413/1201031114400210984
How was this tested?
by copying a link Firefox imagined into existence.
If this makes graphical changes, please attach screenshots.
Opened an appropriate bug report for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1876952 as well.
my suggestion would be to do
if server_url.username:
ctx.username = server_url.username
ctx.password = server_url.password or ""
instead to meet the spec used by firefox/browsers.
my suggestion would be to do
if server_url.username: ctx.username = server_url.username ctx.password = server_url.password or ""instead to meet the spec used by firefox/browsers.
this will still crash when passed into the websockets library, which specifically checks for this and raises an exception. In the discord thread I suggested raising an issue with said library as another way.
this will still crash when passed into the websockets library
Hm, I don't have a good setup to test this without first implementing archipelago:// on linux, so I'll let you and phar decide, I guess.
Is this something we still want to handle like this? Unfortunately seems browsers want to follow a different URI standard than Python does.
I'd still prefer to do things technically correct, but browsers overwriting html with their own imagination is not something we can do much against.
It looks like Firefox undid their change. I have not checked other browsers. There seem to be a bunch of regressions with other URIs. https://bugzilla.mozilla.org/show_bug.cgi?id=1603699 seems to be the upstream "request" to break it (again). The last 4 posts are kinda interesting. Should we just wait and see where it goes? Should we "fix" python websockets?
I guess we'll need to detect Firefox user agent in the long run and serve them their own html, I'm sure they'll love that. :P
I think WHATWG is not Firefox-exclusive, so others may follow if they haven't already.
This is obsolete as webhost has been changed to always return a None password, right?
bumping this for qwint's comment