[HTTPS-Everywhere] Release 2.2 for Firefox seems to ignore default_off

Seth David Schoen schoen at eff.org
Fri Aug 17 12:58:54 PDT 2012


Peter Eckersley writes:

> The problem is the call to the Ruleset constructor in that patch.  It has an
> extra parameter, xmlruleset.getAttribute("f"), which isn't expected.
> 
> Seth, can you look to see whether you intended to do something else with that
> parameter, or whether we should just pull it out?

Hi Peter,

The commit you linked to seems very different to me from the one that I originally
made in June.  My commit was fc91c08f4a4260a123d3563fd0bd9765a7498d3d and it
replaced code that previously _did_ invoke this constructor this way, as follows:

-    if (xmlruleset. at match_rule.length() > 0) match_rl = xmlruleset. at match_rule;
-    if (xmlruleset. at default_off.length() > 0) dflt_off = xmlruleset. at default_off;
-    if (xmlruleset. at platform.length() > 0) platform = xmlruleset. at platform;
-    var rs = new RuleSet(xmlruleset. at name, xmlruleset. at f, match_rl, dflt_off, platform);
+    this.log(DBUG, "Parsing " + xmlruleset.getAttribute("name") + " from " + file.path);
+
+    var match_rl = xmlruleset.getAttribute("match_rule");
+    var dflt_off = xmlruleset.getAttribute("default_off");
+    var platform = xmlruleset.getAttribute("platform");
+    var rs = new RuleSet(xmlruleset.getAttribute("name"), xmlruleset.getAttribute("f"), match_rl, dflt_off, platform);

I don't know why the version in a1d02f16794ed4d593863e5921b4b05c93badf27 is so
different.

The reason for my patch using xmlruleset.getAttribute("f") is not because I was
introducing it into the codebase, but because the version I was patching used
xmlruleset. at f in the same context. :-)

-- 
Seth Schoen  <schoen at eff.org>
Senior Staff Technologist                       https://www.eff.org/
Electronic Frontier Foundation                  https://www.eff.org/join
454 Shotwell Street, San Francisco, CA  94110   +1 415 436 9333 x107




More information about the HTTPS-everywhere mailing list