From 971b7690860c677374cbe14ee64558b1bd174718 Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Mon, 20 Oct 2014 02:25:28 +0200 Subject: https-everywhere updated to 4.0.2 --- .../https-everywhere@eff.org/chrome/content/code/HTTPS.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'data/extensions/https-everywhere@eff.org/chrome/content/code/HTTPS.js') diff --git a/data/extensions/https-everywhere@eff.org/chrome/content/code/HTTPS.js b/data/extensions/https-everywhere@eff.org/chrome/content/code/HTTPS.js index c39a0ef..fda0a30 100644 --- a/data/extensions/https-everywhere@eff.org/chrome/content/code/HTTPS.js +++ b/data/extensions/https-everywhere@eff.org/chrome/content/code/HTTPS.js @@ -30,12 +30,23 @@ const HTTPS = { httpsForcedExceptions: null, httpsRewrite: null, - replaceChannel: function(applicable_list, channel) { + replaceChannel: function(applicable_list, channel, httpNowhereEnabled) { var blob = HTTPSRules.rewrittenURI(applicable_list, channel.URI.clone()); - if (null == blob) return false; // no rewrite + if (null === blob) { + // Abort insecure requests when HTTP Nowhere is on + if (httpNowhereEnabled && channel.URI.schemeIs("http")) { + IOUtil.abort(channel); + } + return false; // no rewrite + } var uri = blob.newuri; if (!uri) this.log(WARN, "OH NO BAD ARGH\nARGH"); + // Abort downgrading if HTTP Nowhere is on + if (httpNowhereEnabled && uri.schemeIs("http")) { + IOUtil.abort(channel); + } + var c2 = channel.QueryInterface(CI.nsIHttpChannel); this.log(DBUG, channel.URI.spec+": Redirection limit is " + c2.redirectionLimit); // XXX This used to be (c2.redirectionLimit == 1), but that's very -- cgit v1.2.3