RequestPolicy/requestpolicy — Issue #82: Adblock Plus filter subscription downloads are blocked
Author: jsamuel
Created: 2011-12-22 05:01:34+00:00
State: open
Labels: extension

A download like https://easylist-downloads.adblockplus.org/easylist.txt often redirects to http://adblockplus.mozdev.org/easylist/easylist.txt. As it is now, RequestPolicy will block this redirect. Same goes for redirects from the old filter list address (https://easylist.adblockplus.org/easylist.txt) to the new one. I see that you try to deal with this by adding a special "compatibility rule" - only that it doesn't consider the new (three months old) server setup. Nor is it considering the setup of filter lists other than EasyList. And I am left wondering why for many users the client fails following redirects.

Is it really necessary to block redirects in requests coming from extensions? What is the security gain from trying to restrict code that already has full privileges? You can easily detect a privileged request:

{{{
var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
.getService(Components.interfaces.nsIScriptSecurityManager);
var principal = secMan.getChannelPrincipal(channel);
if (secMan.isSystemPrincipal(principal))
{
// Ignore requests from privileged code
return;
}
}}}

This will eliminate all your extension and application compatibility issues.