ipfs / ipfs/ipfs-companion

HTTPS Everywhere in EASE mode blocks redirect to http://*.localhost

Open
#855 3 comments 1 reaction 0 assignees View on GitHub
area/firefox
Dominant language
JavaScript
Stars
2.2k
Forks
338
Avg merge
3m
Merged PRs (30d)
1

Description

There is an Encrypt All Sites Eligible (EASE) opt-in mode in [HTTPS Everywhere](https://github.com/EFForg/https-everywhere/) which protects users against downgrade from `https://` to `http://` even when HSTS header is not present.

## Problem

This is a minor inconvenience for DNSLink redirects to `*.localhost` subdomains introduced in #853, as those get blocked if the feature is enabled:

> ![HTTPS-Everywhere-EASE-mode-2020-03-27--12-34-08](https://user-images.githubusercontent.com/157609/77752521-fda97c80-7027-11ea-8c85-9ec594aaf702.png)

> ![HTTPS-Everywhere-2020-03-27--12-33-20](https://user-images.githubusercontent.com/157609/77752530-01d59a00-7028-11ea-9607-3c4c7bcbc603.png)

## Solution

- Before starting work, check if the issue is limited to Firefox
- if so, this may go away when Firefox marks `*.localhost` as Secure Context ([Bug 1220810](https://bugzilla.mozilla.org/show_bug.cgi?id=1220810#c23)), but that depends on how HTTPS Everywhere determines "unsafe" redirect (won't help if they just look at URL.protocol scheme, and not if URL.origin is Secure Context)
- Universal fix: PR HTTPS Everywhere to exclude redirects to `*.localhost` as browser vendors hardcode it to point at loopback IP and mark it as Secure Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.