[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [https-everywhere/master 7/7] If a rule is inactive, its cookierules are too
Author: Peter Eckersley <pde@xxxxxxx>
Date: Wed, 10 Nov 2010 16:27:08 -0800
Subject: If a rule is inactive, its cookierules are too
Commit: 475c5254e0336f2d529e7d98bdbabb75a66ff8cb
---
src/chrome/content/code/HTTPSRules.js | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/chrome/content/code/HTTPSRules.js b/src/chrome/content/code/HTTPSRules.js
index f027470..4a217f3 100644
--- a/src/chrome/content/code/HTTPSRules.js
+++ b/src/chrome/content/code/HTTPSRules.js
@@ -315,11 +315,12 @@ const HTTPSRules = {
var i,j;
// XXX lots of optimisation could happen here
for (i = 0; i < this.rules.length; ++i)
- for (j = 0; j < this.rules[i].cookierules.length; j++) {
- var cr = this.rules[i].cookierules[j];
- if (cr.host_c.test(c.host) && cr.name_c.test(c.name))
- return true;
- }
+ if (this.rules[i].active)
+ for (j = 0; j < this.rules[i].cookierules.length; j++) {
+ var cr = this.rules[i].cookierules[j];
+ if (cr.host_c.test(c.host) && cr.name_c.test(c.name))
+ return true;
+ }
return false;
}
--
1.7.1