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.

Travis do not support strange target host #7231

Closed

Description

@ivysrono

Activity

  1. numismatika commented on Sep 30, 2016

    @numismatika
    Contributor

    is .cn. really the intended target?
    I would expect either a trailing wildcard or a simple .cn instead of aa trailing dot

  2. ivysrono commented on Sep 30, 2016

    @ivysrono
    ContributorAuthor

    Yes, whether you believe it or not.
    Probably the wrong programmers, but it is in normal operation.

  3. jeremyn commented on Sep 30, 2016

    @jeremyn
    Contributor

    Trailing dots in hostnames are legal, for example see this StackOverflow discussion. c2cpicdw.qpic.cn and c2cpicdw.qpic.cn. are effectively the same.

    In #7229 the test is failing because c2cpicdw.qpic.cn. doesn't pass XML validation. However, even if it did pass XML validation, I would then expect an error because of duplicate targets c2cpicdw.qpic.cn and c2cpicdw.qpic.cn..

    @renyouguo What is a specific use case where c2cpicdw.qpic.cn. is needed and c2cpicdw.qpic.cn won't work?

    I think it would be a valid enhancement to add support for trailing dots. @fuglede @Hainish @J0WI Thoughts?

  4. gloomy-ghost commented on Sep 30, 2016

    @gloomy-ghost
    Collaborator
    1. Whether domains have a dot at the end or not, their DNS records are the same.
    2. HTTPS-EW can redirect domains which have a dot at the end to https even there are not specific rulesets for them.

    Therefore, I think this is not a problem.

    Append: For complicated rules, we do need to add support for trailing dots

  5. ivysrono commented on Oct 1, 2016

    @ivysrono
    ContributorAuthor
  6. Hainish commented on Oct 11, 2016

    @Hainish
    Member

    Note: depending on how the HTTP server handles the Host header, http(s)://www.example.com may not serve the same site as http(s)://www.example.com..

    Take http://www.libssh.org. as an example. This returns a 400 response code, as opposed to the 200 returned by leaving off the trailing dot. This means that if we really wanted to be thorough, we'd test with and without the trailing dot, and add or remove hosts as appropriate. If we did this for every ruleset, this may double the size of hosts in the ruleset - each one of which is loaded into memory and delivered to users at download time.

    Considering the above, the cost of being thorough here is too high for the benefit of supporting a strangely formatted, but technically valid, hostname.

  7. jeremyn commented on Oct 11, 2016

    @jeremyn
    Contributor

    I get 200 for http://www.libssh.org. from both Firefox and curl, not 400.

    Also, from the StackOverflow discussion I linked in #7231 (comment) , my understanding is that all full domain names have the trailing dot, and using the domain name without the dot is just an extremely common shortcut. So browsers consider them the same thing, and if they behave differently then something is misconfigured or explicitly customized somewhere along the chain.

  8. Hainish commented on Oct 12, 2016

    @Hainish
    Member

    I'm now only getting a 400 response from https://www.libssh.org./

    Browsers do not treat them the same in that the Host header passed by both Firefox and Chrome in the above request is www.libssh.org. If a web server is configured to differentiate based on the trailing ., we could see wildly different results, regardless of what the standards state. It'd be interesting to see how many of the Alexa Top 1M sites have differing results for the trailing .. Just looking at the top 20, we get:

    http://baidu.com./
    https://twitter.com./
    http://live.com./
    http://linkedin.com./
    http://instagram.com./
    http://weibo.com./
    http://360.cn./

  9. jeremyn commented on Oct 12, 2016

    @jeremyn
    Contributor

    I can confirm the 400 in Firefox for https://www.libssh.org./ , but not in curl. That's fine.

    I see what you mean about Host now. My knee-jerk reaction is to say that these sites are handling Host poorly, though I'm surprised to see that at such major sites. Funny enough though, my own tiny personal site https://jeremynation.me also gets a 400 with a trailing dot. It's just static content served with Apache so it must be easy to mess trailing dot handling up.

    I agree that trying to match every target with and without a trailing dot is too much. But it would be nice if HTTPS Everywhere could match targets that explicitly had a trailing dot, which is what this issue was originally about.

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