alakajam-team / alakajam

Website powering the Alakajam! game making community
https://alakajam.com/
Other
28 stars 13 forks source link

Cookies could be securer #577

Closed ttencate closed 3 years ago

ttencate commented 3 years ago

Voici:

cookies

On the __cfduid cookie, SameSite is set to Lax, which may be out of our control because it's a CloudFlare thing, but maybe there's a setting for it. I think it could be set to Strict from a technical point of view, but of course it would be bad for CloudFlare's evil tracking.

On the connect.sid cookie, Secure is false which is #336, but also SameSite is None which can definitely be improved. Setting it to Lax should provide a line of defense against CSRF without compromising functionality. Strict is probably too strict: iiuc, links from external sites would no longer send the cookie on first request, making it appear as if you are logged out.