[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-128.2.0esr-14.0-1] fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Wed Sep 4 16:55:38 UTC 2024



Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser


Commits:
bc937da4 by cypherpunks1 at 2024-09-04T16:34:55+00:00
fixup! Bug 3455: Add DomainIsolator, for isolating circuit by domain.

Bug 43114: Fix first party detection for reader view on Android

- - - - -


1 changed file:

- toolkit/components/tor-launcher/TorDomainIsolator.sys.mjs


Changes:

=====================================
toolkit/components/tor-launcher/TorDomainIsolator.sys.mjs
=====================================
@@ -315,17 +315,23 @@ class TorDomainIsolatorImpl {
       const channel = aChannel.QueryInterface(Ci.nsIChannel);
       let firstPartyDomain = channel.loadInfo.originAttributes.firstPartyDomain;
       const userContextId = channel.loadInfo.originAttributes.userContextId;
-      const loadingPrincipalURI = channel.loadInfo.loadingPrincipal?.URI;
-      if (loadingPrincipalURI?.spec.startsWith("about:reader")) {
+      const scheme = channel.loadInfo.loadingPrincipal?.URI?.scheme;
+      const filePath = channel.loadInfo.loadingPrincipal?.URI?.filePath;
+      if (
+        (scheme === "about" && filePath === "reader") ||
+        (scheme === "moz-extension" && filePath === "/readerview.html")
+      ) {
         try {
-          const searchParams = new URLSearchParams(loadingPrincipalURI.query);
+          const searchParams = new URLSearchParams(
+            channel.loadInfo.loadingPrincipal.URI.query
+          );
           if (searchParams.has("url")) {
             firstPartyDomain = Services.eTLD.getSchemelessSite(
               Services.io.newURI(searchParams.get("url"))
             );
           }
         } catch (e) {
-          logger.error("Failed to get first party domain for about:reader", e);
+          logger.error("Failed to get first party domain for reader view", e);
         }
       }
       if (!firstPartyDomain) {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/bc937da484e85dfa90b9a93980b22ac47aa1c5c8

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/bc937da484e85dfa90b9a93980b22ac47aa1c5c8
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240904/e9b94cca/attachment-0001.htm>


More information about the tor-commits mailing list