[Pkg-mozext-commits] [requestpolicy] 03/13: Check for explicit existence of lower level in domain hierarchy.
David Prévot
taffit at moszumanska.debian.org
Wed Feb 18 23:07:53 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository requestpolicy.
commit 3e803d6a56d5873c6faa2388d5b77e7ad0c24d52
Author: Cody Boisclair <cody at zone38.net>
Date: Sun Jan 25 01:45:46 2015 -0500
Check for explicit existence of lower level in domain hierarchy.
Mozilla's implementation of Object.prototype has a predefined "watch"
function which is retrieved via bracket notation even if not explicitly
defined. This causes issues when parsing any domain with "watch" located
somewhere in the hierarchy of subdomains.
---
src/modules/Ruleset.jsm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/modules/Ruleset.jsm b/src/modules/Ruleset.jsm
index f982657..87386db 100644
--- a/src/modules/Ruleset.jsm
+++ b/src/modules/Ruleset.jsm
@@ -678,14 +678,16 @@ DomainEntry.prototype = {
},
addLowerLevel : function(name, entry) {
- if (this._lower[name]) {
+ if (this._lower.hasOwnProperty(name)) {
throw "ENTRY_ALREADY_EXISTS";
}
this._lower[name] = entry;
},
getLowerLevel : function(name) {
- return this._lower[name];
+ if (this._lower.hasOwnProperty(name)) {
+ return this._lower[name];
+ }
}
};
--
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