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.

cookie changed to "secure" even if connection was NOT https #1584

Closed

Description

@dan42

According to https://www.eff.org/https-everywhere/rulesets#secure-cookies the <securecookie> tag should only set the secure flag on a cookie if it was sent over HTTPS. However if you go to http://fast.animenewsnetwork.com/ the session cookie's secure flag is set. This is in direct contradiction of the docs.

Activity

  1. dan42 commented on Apr 26, 2015

    @dan42
    Author

    Thanks for improving the ruleset... but it's not what my bug report was about. Honestly I think the original ruleset didn't really have a problem; the problem is with the fact that https-everywhere changes the cookie to "secure" even if it was not sent over a secure connection. Not only is that in contradiction of the docs, it also makes no sense; a cookie set by a http://whatever.com will never be sent back on future visits to http://whatever.com if it's marked secure; it's completely useless.

    This is a bug with https-everywhere, not with this specific rule.

    More specifically, a few of our subdomains do not support HTTPS. For example http://www.d.animenewsnetwork.com/ is meant to bypass Cloudflare (because sometimes it's wonky) and therefore doesn't have HTTPS. But the session cookie is still set with domain=.animenewsnetwork.com and therefore is converted to "secure". Which makes it impossible to be logged in at that url.

    I very much appreciate the fact that Anime News Network has been added to https-everywhere. An easy fix would be to remove the <securecookie> tag in this ruleset, but the real fix is to set the secure flag only for cookies sent over a HTTPS connection.

  2. dan42 commented on Apr 27, 2015

    @dan42
    Author

    It's worth noting this is a problem with both the Firefox ands Chrome plugins.

  3. jsha commented on Apr 27, 2015

    @jsha
    Member

    @dan42: I wasn't able to reproduce on Firefox. Can you provide detailed repro instructions?

  4. dan42 commented on Apr 27, 2015

    @dan42
    Author
    1. go to http://www.d.animenewsnetwork.com/
    2. try to login

    Even though the login "works" (no error message), you will not be logged in because the session cookie is flagged as secure even though the url is not HTTPS.

  5. jsha commented on Apr 27, 2015

    @jsha
    Member

    Which cookie is the one you find is marked secure?

  6. dan42 commented on Apr 27, 2015

    @dan42
    Author

    ann5_session_id

  7. jsha commented on Apr 27, 2015

    @jsha
    Member

    Also, I'm having trouble signing up for an account (email hasn't arrived yet). If you can send me a test login (jsha@eff.org) that would be very helpful.

  8. dan42 commented on Apr 27, 2015

    @dan42
    Author

    Ok I sent you a test account

  9. jsha commented on Apr 27, 2015

    @jsha
    Member

    Great, thanks! I can reproduce now. I'll look into it.

  10. dan42 commented on Apr 30, 2015

    @dan42
    Author

    If this bug cannot be resolved in time for the next release, please remove the <securecookie> tag in this ruleset. Thank you.

  11. jsha commented on Apr 30, 2015

    @jsha
    Member

    Sounds good. I still want to try and figure out why HTTPS Everywhere is securing a cookie sent over HTTP, but I've merged @Deathlyx's change.

  12. gloomy-ghost commented on Nov 23, 2016

    @gloomy-ghost
    Collaborator

    Does 0fcd111 resolve the issue?

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