Skip to content

gui: Filter scope ID out of IPv6 addresses in Remote GUI (fixes #8084) - #8559

Merged
calmh merged 1 commit into
syncthing:mainfrom
tomasz1986:tomasz86/gui/filter-out-scope-id
Sep 27, 2022
Merged

calmh merged 1 commit into
syncthing:mainfrom
tomasz1986:tomasz86/gui/filter-out-scope-id

Conversation

@tomasz1986

Copy link
Copy Markdown
Member

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]

…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]>
@calmh
calmh merged commit b399854 into syncthing:main Sep 27, 2022
@acolomb

acolomb commented Sep 27, 2022

Copy link
Copy Markdown
Member

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:
https://mailarchive.ietf.org/arch/msg/ietf-announce/BqBF9qvZ8qZR4ZPlawPvQSe0WbU/
https://bugzilla.mozilla.org/show_bug.cgi?id=700999

@tomasz1986

tomasz1986 commented Sep 27, 2022 •

Copy link
Copy Markdown
Member Author

A link-local IPv6 address without a scope identifier cannot work.

But it does open for me if I remove the scope ID… How is this possible then?

@calmh

calmh commented Sep 27, 2022 •

Copy link
Copy Markdown
Member

@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...

@tomasz1986

tomasz1986 commented Sep 27, 2022 •

Copy link
Copy Markdown
Member Author

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

there are no plans to support this.

so there is that. On the other hand, Internet Explorer seems to support these URLs 🙃.

@acolomb

acolomb commented Sep 27, 2022

Copy link
Copy Markdown
Member

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.

calmh added a commit to calmh/syncthing that referenced this pull request Oct 3, 2022
* 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
@calmh calmh added this to the v1.22.1 milestone Oct 17, 2022
@tomasz1986
tomasz1986 deleted the tomasz86/gui/filter-out-scope-id branch September 12, 2023 18:31
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Mar 10, 2024
@syncthing syncthing locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants