Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SameSite='None' flagged as invalid #433

Open
thecontrarycat opened this issue Oct 19, 2020 · 4 comments
Open

SameSite='None' flagged as invalid #433

thecontrarycat opened this issue Oct 19, 2020 · 4 comments

Comments

@thecontrarycat
Copy link
Contributor

Chrome introduced the SameSite=None option for cookies earlier this year and with the introduction of Chrome 80 applied the default of Lax to all cookies without a SameSite attribute.

To maintain the previous behaviour, it is necessary to apply both the HttpOnly and SameSite=None flags.

However, Observatory penalises this with a -20 as it thinks SameSite=None is an invalid value.

With Microsoft Azure now sending an ARRAffinitySameSite cookie by default this heavily penalises all Azure websites that require server affinity.

@floatingatoll
Copy link
Contributor

floatingatoll commented Oct 19, 2020 via email

@thecontrarycat
Copy link
Contributor Author

They both fail. The analyser code treats any values other than Lax and Strict as invalid.

Here's the cookie in question:
image

@thecontrarycat
Copy link
Contributor Author

@april would you accept a pull request for this?

The fix I am thinking about is for values other than Strict, Lax and None to be invalid (even True and not set) and for None to also be invalid if secure isn't set.

I've also found a potential bug where you can get the +5 score for 'cookies-secure-with-httponly-sessions-and-samesite' while some of those cookies don't have a samesite attribute. Thoughts?

@april
Copy link
Contributor

april commented Nov 2, 2020

That sounds reasonable to me. I think you only need SameSite on session cookies, IIRC, but it's been a while since I've looked at that code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants