Repository navigation
gui: Filter scope ID out of IPv6 addresses in Remote GUI (fixes #8084) - #8559
Conversation
…hing#8084) Currently, the link to remote GUI uses device addresses as they are advertised from the router. Because of this, they may end up having a scope ID attached to them. The problem is that browsers do not support such addresses, leaving the user with a non-working URL. Because of the above, use regex to simply filter out the scope ID from the address before using it for Remote GUI. Signed-off-by: Tomasz Wilczyński <[email protected]>
|
A link-local IPv6 address without a scope identifier cannot work. I don't see how a router is involved in that though. Regarding browser support for these addresses, a new specification is close to ready that will change the URL syntax specification to allow them, avoiding the percent encoding dilemma. So I think this should be reverted as it's definitely wrong to filter them out and the browser bug preventing meaningful usage of the link right now for some address types is about to get solved properly. There was a lengthy discussion about this in the original PR and the outcome was to leave the address as is, because the only real solution is for the browser to start supporting it. Ref: |
But it does open for me if I remove the scope ID… How is this possible then? |
|
@acolomb File a PR to implement the new behavior when it's implemented by a browser. So far there seems to be only one user in the world who runs into this situation and cares about it, and that's @tomasz1986 so I'll go with their judgement here. I looked at the new IETF doc for all of ten seconds and it looked like it limited scope identifiers to basic ASCII, which will anyway require a lot of filtering somewhere as Windows tends to use localized identifiers, be they in Swedish or Japanese... |
|
I think the related Chromium issue is https://bugs.chromium.org/p/chromium/issues/detail?id=70762. The latest official reply from 5 years ago states so there is that. On the other hand, Internet Explorer seems to support these URLs 🙃. |
|
Browsers declined to support it because the WhatWG didn't clearly support and specify it. They in turn pointed out that browser vendors feared the added complexity in parsing the percent encoding ambiguity. That deadlock has only recently been solved and the new specification is almost ready. Whatever Internet Explorer does, it's probably not according to specifications. If it works for you on a system with only one interface, that's a shortcut taken by the operating system in a specific case. Which is neither portable nor clearly defined what should happen. Implementing the new syntax when it's ready seems like a the best approach. |
* upgradescloudfunc: wip wip wip wip wip wip wip wip wip wip wip gui: Filter scope ID out of IPv6 addresses in Remote GUI (fixes syncthing#8084) (syncthing#8559) cmd/syncthing: Fix incorrect cli help text (syncthing#8557) docker: Add env var to control capabilities (syncthing#8552) gui, man, authors: Update docs, translations, and contributors
Currently, the link to remote GUI uses device addresses as they are advertised from the router. Because of this, they may end up having a scope ID attached to them. The problem is that browsers do not support such addresses, leaving the user with a non-working URL.
Because of the above, use regex to simply filter out the scope ID from the address before using it for Remote GUI.
Signed-off-by: Tomasz Wilczyński [email protected]