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
1 changed file:
Changes:
... | ... | @@ -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 |