Archipelago icon indicating copy to clipboard operation
Archipelago copied to clipboard

CommonClient: handle Firefox removing the password part of userinfo

Open Berserker66 opened this issue 1 year ago • 7 comments

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.

Berserker66 avatar Jan 28 '24 05:01 Berserker66

Opened an appropriate bug report for Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1876952 as well.

ThePhar avatar Jan 28 '24 05:01 ThePhar

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.

black-sliver avatar Jan 30 '24 08:01 black-sliver

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.

Berserker66 avatar Jan 31 '24 05:01 Berserker66

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.

black-sliver avatar Jan 31 '24 06:01 black-sliver

Is this something we still want to handle like this? Unfortunately seems browsers want to follow a different URI standard than Python does.

ThePhar avatar Apr 21 '24 01:04 ThePhar

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.

Berserker66 avatar Jun 21 '24 13:06 Berserker66

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?

black-sliver avatar Jun 26 '24 18:06 black-sliver

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

Berserker66 avatar Jul 11 '24 05:07 Berserker66

I think WHATWG is not Firefox-exclusive, so others may follow if they haven't already.

black-sliver avatar Jul 15 '24 22:07 black-sliver

This is obsolete as webhost has been changed to always return a None password, right?

qwint avatar Sep 05 '25 17:09 qwint

bumping this for qwint's comment

NewSoupVi avatar Oct 05 '25 10:10 NewSoupVi