From 482a8048109fe099b05eab5651d8bc47c90cb95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Fuglede=20J=C3=B8rgensen?= Date: Mon, 14 Mar 2016 20:05:39 +0100 Subject: [PATCH 1/2] Allow requests to hidden services with HTTP Nowhere This excludes .onion hostnames from the main HTTP Nowhere request block. It also updates the HTTP Nowhere label to reflect the change. This fixes https://github.com/EFForg/https-everywhere/issues/4118 --- src/chrome/content/code/HTTPS.js | 4 ++-- src/chrome/locale/en/https-everywhere.dtd | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chrome/content/code/HTTPS.js b/src/chrome/content/code/HTTPS.js index c5834ddd0d03..1ba27b4a0101 100644 --- a/src/chrome/content/code/HTTPS.js +++ b/src/chrome/content/code/HTTPS.js @@ -43,8 +43,8 @@ const HTTPS = { var isSTS = securityService.isSecureURI( CI.nsISiteSecurityService.HEADER_HSTS, channel.URI, 0); if (blob === null) { - // Abort insecure requests if HTTP Nowhere is on - if (httpNowhereEnabled && channel.URI.schemeIs("http") && !isSTS) { + // Abort insecure non-onion requests if HTTP Nowhere is on + if (httpNowhereEnabled && channel.URI.schemeIs("http") && !isSTS && !/\.onion$/.test(channel.URI.host)) { IOUtil.abort(channel); } return false; // no rewrite diff --git a/src/chrome/locale/en/https-everywhere.dtd b/src/chrome/locale/en/https-everywhere.dtd index 2ac51cdd08eb..feb9c51870c8 100644 --- a/src/chrome/locale/en/https-everywhere.dtd +++ b/src/chrome/locale/en/https-everywhere.dtd @@ -19,7 +19,7 @@ - + From b5484e98f2b1451e1eba64cf42b0ef1eee1db9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Fuglede=20J=C3=B8rgensen?= Date: Thu, 17 Mar 2016 21:53:59 +0100 Subject: [PATCH 2/2] New name for HTTP Nowhere string This gives the relevant i18n variable a more natural name and also has the advantage of not messing with existing translations. --- src/chrome/content/toolbar_button.xul | 2 +- src/chrome/locale/en/https-everywhere.dtd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chrome/content/toolbar_button.xul b/src/chrome/content/toolbar_button.xul index 2736b669a0b3..cd646e984513 100644 --- a/src/chrome/content/toolbar_button.xul +++ b/src/chrome/content/toolbar_button.xul @@ -47,7 +47,7 @@ command="https-everywhere-menuitem-resetToDefaults" class="hide-on-disable"/> - - +