Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

New "HTTPS unavailable" interstitial page misses some cases #16418

Closed

Description

@jsha

Type: code issue

I've got the latest HTTPS Everywhere, and tested http://http.badssl.com/ with "Block All HTTP Requests" enabled; the interstitial works great!

However, when I visit http://brokenballots.com, I get the browser's "Connection timed out" error.
Disabling "Block all HTTP Requests" allows me to visit the site (which is a redirect).

Also, visiting http://timbergroves.com/bb/ gives ERR_SSL_PROTOCOL_ERROR instead of the interstitial.

Activity

  1. bcyphers commented on Aug 28, 2018

    @bcyphers
    Contributor

    Related to #16394?

  2. cschanaj commented on Aug 29, 2018

    @cschanaj
    Collaborator

    AFAIK, this is not related to #16394. These errors happen when the requests are already made and should be handled in onErrorOccurred(details).

    function onErrorOccurred(details) {
    if (redirectCounter.has(details.requestId)) {
    redirectCounter.delete(details.requestId);
    }
    }

    I tried to fix this with chrome.tab.update to force redirect a tab to the interstitial page, but it could not distinguish errors which are not caused by HTTPSE, e.g. Could not resolve host. So I guess a more sophisticated mechanism is needed to fix this.

  3. bcyphers commented on Aug 29, 2018

    @bcyphers
    Contributor

    Yeah, this is tricky. It'll be hard to know whether any given error was the result of HTTPS Everywhere's rewrite instead of a regular host problem. Should we try listing out the errors that are probably a result of HTTPSE?

  4. cschanaj commented on Aug 30, 2018

    @cschanaj
    Collaborator

    string. The error description. This string is an internal error string, may vary from one browser to another, and is not guaranteed to stay the same between releases.

    This might require some maintenance effort, since the strings might change from time to time according to Mozilla's documentation. However, I think this is a good workaround for SSL errors which hopefully the messages will not change frequently.

  5. Hainish commented on Sep 13, 2018

    @Hainish
    Member

    In Chrome I can enumerate a class of errors that are likely due to HTTPS misconfigurations:

    details.error.indexOf("net::ERR_SSL_") == 0 ||                               
    details.error.indexOf("net::ERR_CERT_") == 0 ||                              
    details.error.indexOf("net::ERR_CONNECTION_") == 0

    For Firefox, this is very tricky. I received these three errors in details.error for three different HTTPS bad configurations:

    NS_ERROR_CONNECTION_REFUSED
    SSL received a record that exceeded the maximum permissible length.
    NS_ERROR_UNKNOWN_HOST

    I could enumerate these but it seems like a maintenance nightmare, especially if there is no guarantee that they'll be constant from one version to the next.

    I've fixed this for Chrome, anyway: Hainish@ef50c39. This limits the interstitial page to showing only when HTTP Nowhere has done an explicit redirect to HTTPS.

    One solution for Firefox that seems really ugly is just ignoring the error code and if an HTTP Nowhere HTTPS redirect is issued, show the interstitial page. Of course, this will mean that DNS resolution failures will result in the interstitial page too. I don't think that the trade-off is worth it in this case.

  6. Hainish commented on Sep 14, 2018

    @Hainish
    Member

    I've added more SSL misconfigurations to this list: Hainish@dafe0c1

    Chrome makes you pause on the browser error page before redirecting you to HTTPS Everywhere's interstitial, for some reason. Probably for security reasons. But then when you click back, forward, or reload it shows you the HTTPS Everywhere page.

    So this seems ready to go in https://github.com/Hainish/https-everywhere/tree/disable-per-site

  7. Hainish commented on Sep 18, 2018

    @Hainish
    Member

    Implemented in #16546

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions