Skip to content

Commit 482a804

Browse files
committed
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 EFForg#4118
1 parent 43d7eb8 commit 482a804

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/chrome/content/code/HTTPS.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const HTTPS = {
4343
var isSTS = securityService.isSecureURI(
4444
CI.nsISiteSecurityService.HEADER_HSTS, channel.URI, 0);
4545
if (blob === null) {
46-
// Abort insecure requests if HTTP Nowhere is on
47-
if (httpNowhereEnabled && channel.URI.schemeIs("http") && !isSTS) {
46+
// Abort insecure non-onion requests if HTTP Nowhere is on
47+
if (httpNowhereEnabled && channel.URI.schemeIs("http") && !isSTS && !/\.onion$/.test(channel.URI.host)) {
4848
IOUtil.abort(channel);
4949
}
5050
return false; // no rewrite

‎src/chrome/locale/en/https-everywhere.dtd‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!ENTITY https-everywhere.menu.observatory "SSL Observatory Preferences">
2020
<!ENTITY https-everywhere.menu.globalEnable "Enable HTTPS Everywhere">
2121
<!ENTITY https-everywhere.menu.globalDisable "Disable HTTPS Everywhere">
22-
<!ENTITY https-everywhere.menu.blockHttpRequests "Block all HTTP requests">
22+
<!ENTITY https-everywhere.menu.blockHttpRequests "Block all unencrypted requests">
2323
<!ENTITY https-everywhere.menu.showCounter "Show Counter">
2424
<!ENTITY https-everywhere.menu.viewAllRules "View All Rules">
2525

0 commit comments

Comments
 (0)