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

[tor-commits] [tor-browser/tor-browser-68.1.0esr-9.0-2] Bug 1554805 - Never set firstPartyDomain on origin attributes for moz-extension. r=rpl, Ehsan, tjr



commit 67c1cc525e31d7af3d7ada79211d9edf07b6e07e
Author: Johann Hofmann <jhofmann@xxxxxxxxxxx>
Date:   Sun Oct 6 15:43:39 2019 +0000

    Bug 1554805 - Never set firstPartyDomain on origin attributes for moz-extension. r=rpl,Ehsan,tjr
    
    Differential Revision: https://phabricator.services.mozilla.com/D47425
    
    --HG--
    extra : moz-landing-system : lando
---
 caps/OriginAttributes.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/caps/OriginAttributes.cpp b/caps/OriginAttributes.cpp
index 7f40e6549310..0737bce36321 100644
--- a/caps/OriginAttributes.cpp
+++ b/caps/OriginAttributes.cpp
@@ -92,6 +92,13 @@ void OriginAttributes::SetFirstPartyDomain(const bool aIsTopLevelDocument,
     return;
   }
 
+  // Add-on principals should never get any first-party domain
+  // attributes in order to guarantee their storage integrity when switching
+  // FPI on and off.
+  if (scheme.EqualsLiteral("moz-extension")) {
+    return;
+  }
+
   nsCOMPtr<nsIPrincipal> blobPrincipal;
   if (dom::BlobURLProtocolHandler::GetBlobURLPrincipal(
           aURI, getter_AddRefs(blobPrincipal))) {

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