Bug 40491: Don't auto-pick a v2 address when it's in Onion-Location header
We could do a more strict validation on the v3 host, if needed.
Also linted/formatted Document.cpp
before applying the new patch.
Closes #40491 (closed).
Merge request reports
Activity
assigned to @pierov
marked this merge request as draft from pierov/tor-browser@8ee2a04b
requested review from @henry
- Resolved by henry
- Resolved by henry
- Resolved by Pier Angelo Vendrame
- Resolved by henry
marked this merge request as draft from pierov/tor-browser@d1c50a4f
- Resolved by Pier Angelo Vendrame
Uhm. I don't like it that much, with all these macros. But I guess that's what Firefox C++ looks like.
@richard do you have additional thoughts?
marked this merge request as draft from pierov/tor-browser@87d02085
- Resolved by Pier Angelo Vendrame
Looks good to me. Much clearer than the old code now as well :)
added 1 commit
- dae0e8fa - fixup! Bug 40458: Implement .tor.onion aliases
This was my test for v2 (but you need to temporarily disable the HTTPS test):
from http.server import HTTPServer, SimpleHTTPRequestHandler class OnionLocationHandler(SimpleHTTPRequestHandler): def end_headers(self): self.send_header( "Onion-Location", "http://www.aa234567aaa23456.onion/a" ) SimpleHTTPRequestHandler.end_headers(self) httpd = HTTPServer(("0.0.0.0", 3000), OnionLocationHandler) httpd.serve_forever()
- Resolved by Pier Angelo Vendrame
lgtm assumin gyou've also validated the existing popular onion-location pages still work (nytimes, facebook, reddit, twitter, etc).