Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit referrers on cross-origin requests from an RFC7686 address #155

Open
fmarier opened this issue Nov 9, 2021 · 4 comments
Open

Omit referrers on cross-origin requests from an RFC7686 address #155

fmarier opened this issue Nov 9, 2021 · 4 comments

Comments

@fmarier
Copy link
Member

fmarier commented Nov 9, 2021

The special-use .onion domain name, defined in RFC7686, receives special treatment in the Tor browser and in Firefox: https://searchfox.org/mozilla-central/rev/f8576fec48d866c5f988baaf1fa8d2f8cce2a82f/dom/security/ReferrerInfo.cpp#334-339

It seems like this behavior should be standardized since any browser could be setup to proxy traffic over the Tor SOCKS5 proxy.

@mikewest
Copy link
Member

mikewest commented Nov 9, 2021

Is the StaticPrefs::network_http_referer_hideOnionSource() preffed on by default?

It looks like Mozilla's implementation doesn't allow a page's assertion of a laxer policy to override the .onion === none behavior. I wonder whether there are cases where the site wouldn't want that. Referrer-based ACLs, etc?

@annevk
Copy link
Member

annevk commented Nov 9, 2021

That's a good question, Firefox does not ship this by default: https://searchfox.org/mozilla-central/source/modules/libpref/init/StaticPrefList.yaml#9297-9302.

@fmarier
Copy link
Member Author

fmarier commented Nov 10, 2021

Good catch, I hadn't noticed that this wasn't ON by default in Firefox, just in the Tor Browser. I just tested this with the test page I've been using to replicate the Tor Browser behavior in Brave and Firefox doesn't touch these headers when set to use a local Tor daemon as a SOCKS5 proxy. I updated the two-implementer note on the Fetch PR accordingly.

@fmarier
Copy link
Member Author

fmarier commented Nov 10, 2021

I wonder whether there are cases where the site wouldn't want that. Referrer-based ACLs, etc?

It seems unlikely to me that a site would rely on receiving a .onion referrer for any reason because the majority of users coming from a .onion site will be using the Tor Browser, which doesn't send a referrer in this case. Unless it's to exclude users coming from a .onion site, but I don't know what the point of that would be.

fmarier added a commit to fmarier/webappsec-referrer-policy that referenced this issue Nov 10, 2021
fmarier added a commit to fmarier/webappsec-referrer-policy that referenced this issue Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants