[tbb-bugs] #34366 [Applications/Tor Browser]: The onion-location mechanism does not redirect to full URL
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sat Jun 6 11:13:25 UTC 2020
#34366: The onion-location mechanism does not redirect to full URL
--------------------------------------+--------------------------
Reporter: gk | Owner: tbb-team
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-9.5-issues | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------------------+--------------------------
Comment (by acat):
One way to avoid having to scroll again would be to keep the scroll
position when there is the redirect. That might solve the issue when there
is no hash in the url, so this solution might be implemented
independently.
However, the hash part of the URL (fragment identifier?) is not only used
for anchors, but also for other stuff like navigation in single-page
applications, etc., so it would be good to preserve it. One idea would be
to allow a "relative mode" for Onion-Location, where the value is
interpreted as the scheme + host, and the redirect is performed by
appending the current path + query params + hash to it. This would also
allow to have shorter and simpler Onion-Location headers for websites, and
in most cases, to serve the same static Onion-Location header for the
whole website.
If we think this is a good idea, then the question would be how to do it
in a backwards-compatible way. We could use a trick like: if it starts
with `http:` or `https:`, treat like an absolute `Onion-Location`,
otherwise, treat like a relative one (and assume it's `http:`). I guess
for a .onion, not redirecting to `https` directly is not a big issue.
Another possible solution would be to use sysrqb's idea of making `Onion-
Location` a
[https://trac.torproject.org/projects/tor/ticket/21952#comment:134
structured header]. We could then express a "relative" `Onion-Location`
header like `Onion-Location: "http://hostname.onion"; relative`, for
example (a string item and a boolean parameter `relative`).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34366#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tbb-bugs
mailing list