Skip to content
Snippets Groups Projects
Commit 15b269e2 authored by ma1's avatar ma1 Committed by Beatriz Rizental
Browse files

BB 42832: Download spam prevention exemption for browser extensions.

parent 8a5b2899
No related branches found
No related tags found
1 merge request!1507Rebase Tor Browser onto 136.0a1
......@@ -1920,6 +1920,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment