[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-115.0esrbase-13.0-1] fixup! Bug 23247: Communicating security expectations for .onion



Title: GitLab

ma1 pushed to branch tor-browser-115.0esrbase-13.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 82c31751
    by cypherpunks1 at 2023-07-12T16:18:15-08:00
    fixup! Bug 23247: Communicating security expectations for .onion
    
    Bug 41399: Enable brotli encoding for http onions
    

1 changed file:

Changes:

  • netwerk/protocol/http/HttpBaseChannel.cpp
    ... ... @@ -340,6 +340,7 @@ void HttpBaseChannel::AddClassificationFlags(uint32_t aClassificationFlags,
    340 340
     
    
    341 341
     static bool isSecureOrTrustworthyURL(nsIURI* aURI) {
    
    342 342
       return aURI->SchemeIs("https") ||
    
    343
    +         nsMixedContentBlocker::IsPotentiallyTrustworthyOnion(aURI) ||
    
    343 344
              (StaticPrefs::network_http_encoding_trustworthy_is_https() &&
    
    344 345
               nsMixedContentBlocker::IsPotentiallyTrustworthyLoopbackURL(aURI));
    
    345 346
     }
    
    ... ... @@ -366,7 +367,6 @@ nsresult HttpBaseChannel::Init(nsIURI* aURI, uint32_t aCaps,
    366 367
       // Construct connection info object
    
    367 368
       nsAutoCString host;
    
    368 369
       int32_t port = -1;
    
    369
    -  bool isHTTPS = isSecureOrTrustworthyURL(mURI);
    
    370 370
     
    
    371 371
       nsresult rv = mURI->GetAsciiHost(host);
    
    372 372
       if (NS_FAILED(rv)) return rv;
    
    ... ... @@ -395,7 +395,7 @@ nsresult HttpBaseChannel::Init(nsIURI* aURI, uint32_t aCaps,
    395 395
       if (NS_FAILED(rv)) return rv;
    
    396 396
     
    
    397 397
       rv = gHttpHandler->AddStandardRequestHeaders(
    
    398
    -      &mRequestHead, isHTTPS, aContentPolicyType,
    
    398
    +      &mRequestHead, isSecureOrTrustworthyURL(mURI), aContentPolicyType,
    
    399 399
           nsContentUtils::ShouldResistFingerprinting(this));
    
    400 400
       if (NS_FAILED(rv)) return rv;
    
    401 401
     
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits