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

morgan (@morgan) git at gitlab.torproject.org
Mon Sep 30 17:13:02 UTC 2024



morgan pushed to branch tor-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Tor Browser


Commits:
9dfb89a9 by hackademix at 2024-09-30T17:12:48+00:00
Bug 42832: Download spam prevention exemption for browser extensions.

- - - - -


1 changed file:

- uriloader/exthandler/nsExternalHelperAppService.cpp


Changes:

=====================================
uriloader/exthandler/nsExternalHelperAppService.cpp
=====================================
@@ -1895,6 +1895,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/tor-browser/-/commit/9dfb89a98e9017ce94a03e8602cd25364034ec33

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9dfb89a98e9017ce94a03e8602cd25364034ec33
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/20240930/9ea330f7/attachment-0001.htm>


More information about the tor-commits mailing list