[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.2.0esr-14.0-1] Bug 42832: Download spam prevention exemption for browser extensions.

ma1 (@ma1) git at gitlab.torproject.org
Wed Sep 25 06:26:17 UTC 2024



ma1 pushed to branch mullvad-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser


Commits:
62b28f16 by hackademix at 2024-09-25T08:26:09+02:00
Bug 42832: Download spam prevention exemption for browser extensions.

- - - - -


1 changed file:

- uriloader/exthandler/nsExternalHelperAppService.cpp


Changes:

=====================================
uriloader/exthandler/nsExternalHelperAppService.cpp
=====================================
@@ -1900,6 +1900,12 @@ bool nsExternalAppHandler::IsDownloadSpam(nsIChannel* aChannel) {
   nsCOMPtr<nsIPermissionManager> permissionManager =
       mozilla::services::GetPermissionManager();
   nsCOMPtr<nsIPrincipal> principal = loadInfo->TriggeringPrincipal();
+
+  // Always allow WebExtensions
+  if (principal && principal->SchemeIs("moz-extension")) {
+    return false;
+  }
+
   bool exactHostMatch = false;
   constexpr auto type = "automatic-download"_ns;
   nsCOMPtr<nsIPermission> permission;



View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/62b28f168accde40a14aaff87c7679cd40228f6a

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/62b28f168accde40a14aaff87c7679cd40228f6a
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/20240925/09673bc3/attachment.htm>


More information about the tor-commits mailing list