[tor-bugs] #28005 [Applications/Tor Browser]: Officially support onions in HTTPS-Everywhere

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Apr 1 02:48:30 UTC 2020


#28005: Officially support onions in HTTPS-Everywhere
-------------------------------------------------+-------------------------
 Reporter:  asn                                  |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-hs, https-everywhere, network-   |  Actual Points:  18.3
  team-roadmap-november, network-team-roadmap-   |
  2020Q1, TorBrowserTeam202003R, ux-team         |
Parent ID:  #30029                               |         Points:  20
 Reviewer:  mcs, sysrqb, antonela                |        Sponsor:
                                                 |  Sponsor27-must
-------------------------------------------------+-------------------------

Comment (by sysrqb):

 `browser/actors/ClickHandlerChild.jsm`

 Can you initialize `json.allowOnionUrlbarRewrites`:
 {{{
 json.allowOnionUrlbarRewrites = false;
 }}}

 so it follows the same pattern?

 `browser/base/content/browser.js`
 {{{
       if (gBrowser.selectedBrowser.allowOnionUrlbarRewrites) {
         gBrowser.selectedBrowser.currentOnionAliasURI =
 OnionAliasStore.getShortURI(
           gBrowser.selectedBrowser.currentURI
         );
 }}}
 Is `aLocationURI` equal to `gBrowser.selectedBrowser.currentURI` at this
 point?

 `docshell/base/nsDocShell.cpp`

 Should we have a pref that prevents `mAllowOnionUrlbarRewrites` being
 `true`?

 {{{
     if (NS_SUCCEEDED(oldURI->GetHost(oldHost)) &&
         StringEndsWith(oldHost, NS_LITERAL_CSTRING(".tor.onion")) &&
         NS_SUCCEEDED(newURI->GetHost(newHost)) &&
         StringEndsWith(newHost, NS_LITERAL_CSTRING(".onion")) &&
         !StringEndsWith(newHost, NS_LITERAL_CSTRING(".tor.onion"))) {
 }}}

 Is the "newHost ends with .onion" helpful here?

 (I'll finish reviewing this tomorrow, but so far it looks really good!
 Thanks!)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28005#comment:44>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list