Skip to content

Commit c16d620

Browse files
committed
Disable SSLv3 support to prevent POODLE attack.
1 parent 9bbe318 commit c16d620

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/https-everywhere.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ let WARN=5;
99
// PREFERENCE BRANCHES
1010
let PREFBRANCH_ROOT=0;
1111
let PREFBRANCH_RULE_TOGGLE=1;
12+
let PREFBRANCH_NONE=2;
1213

1314
// maps domain patterns (with at most one wildcard) to RuleSets
1415
let https_domains = {};
@@ -189,6 +190,11 @@ function HTTPSEverywhere() {
189190
this.rule_toggle_prefs = this.get_prefs(PREFBRANCH_RULE_TOGGLE);
190191

191192
this.httpNowhereEnabled = this.prefs.getBoolPref("http_nowhere.enabled");
193+
194+
// Disable SSLv3 to prevent POODLE attack.
195+
// https://www.imperialviolet.org/2014/10/14/poodle.html
196+
var root_prefs = this.get_prefs(PREFBRANCH_NONE);
197+
root_prefs.setIntPref("security.tls.version.min", 1);
192198

193199
// We need to use observers instead of categories for FF3.0 for these:
194200
// https://developer.mozilla.org/en/Observer_Notifications
@@ -736,8 +742,10 @@ HTTPSEverywhere.prototype = {
736742
// get our preferences branch object
737743
// FIXME: Ugly hack stolen from https
738744
var branch_name;
739-
if(prefBranch == PREFBRANCH_RULE_TOGGLE)
745+
if(prefBranch === PREFBRANCH_RULE_TOGGLE)
740746
branch_name = "extensions.https_everywhere.rule_toggle.";
747+
else if (prefBranch === PREFBRANCH_NONE)
748+
branch_name = "";
741749
else
742750
branch_name = "extensions.https_everywhere.";
743751
var o_prefs = false;

0 commit comments

Comments
 (0)