[tbb-commits] [tor-browser/tor-browser-68.9.0esr-10.0-1] fixup! Bug 23247: Communicating security expectations for .onion

gk at torproject.org gk at torproject.org
Wed Jun 24 19:02:39 UTC 2020


commit a745de73db61e6654554109b06ece81329a9244d
Author: Alex Catarineu <acat at torproject.org>
Date:   Wed Jun 24 15:03:42 2020 +0200

    fixup! Bug 23247: Communicating security expectations for .onion
    
    Fixes bug 34383.
---
 dom/security/nsMixedContentBlocker.cpp | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/dom/security/nsMixedContentBlocker.cpp b/dom/security/nsMixedContentBlocker.cpp
index 2bbc2e8aecb3..fecbd5552ec3 100644
--- a/dom/security/nsMixedContentBlocker.cpp
+++ b/dom/security/nsMixedContentBlocker.cpp
@@ -746,16 +746,7 @@ nsresult nsMixedContentBlocker::ShouldLoad(
     return NS_OK;
   }
   if (!parentIsHttps) {
-    nsAutoCString parentHost;
-    rv = innerRequestingLocation->GetHost(parentHost);
-    if (NS_FAILED(rv)) {
-      NS_ERROR("requestingLocation->GetHost failed");
-      *aDecision = REJECT_REQUEST;
-      return NS_OK;
-    }
-
-    bool parentIsOnion =
-        StringEndsWith(parentHost, NS_LITERAL_CSTRING(".onion"));
+    bool parentIsOnion = IsPotentiallyTrustworthyOnion(innerRequestingLocation);
     if (!parentIsOnion) {
       *aDecision = ACCEPT;
       return NS_OK;



More information about the tbb-commits mailing list