[Pkg-mozext-commits] [requestpolicy] 42/65: [fix] conflicting subscription rules: apply default policy

David Prévot taffit at moszumanska.debian.org
Fri Mar 25 22:59:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit d8be2844280d4ba2e834436a5ea54ecc59c926f5
Author: Martin Kimmerle <dev at 256k.de>
Date:   Mon Feb 1 14:47:10 2016 +0100

    [fix] conflicting subscription rules: apply default policy
---
 src/content/lib/request-processor.redirects.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/content/lib/request-processor.redirects.js b/src/content/lib/request-processor.redirects.js
index 2f0fce6..4e4cbe4 100644
--- a/src/content/lib/request-processor.redirects.js
+++ b/src/content/lib/request-processor.redirects.js
@@ -114,7 +114,6 @@ RequestProcessor = (function(self) {
     {
       let result = PolicyManager.checkRequestAgainstUserRules(originURIObj,
           destURIObj);
-      // For user rules, use the default policy if both types of rule match.
       if (result.denyRulesExist() && result.allowRulesExist()) {
         result.isAllowed = Prefs.isDefaultAllow();
         return result;
@@ -132,7 +131,10 @@ RequestProcessor = (function(self) {
     {
       let result = PolicyManager.checkRequestAgainstSubscriptionRules(
           originURIObj, destURIObj);
-      // For now, we always give priority to deny rules.
+      if (result.denyRulesExist() && result.allowRulesExist()) {
+        result.isAllowed = Prefs.isDefaultAllow();
+        return result;
+      }
       if (result.denyRulesExist()) {
         result.isAllowed = false;
         return result;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list