Grav: Add the SameSite cookie flag

Created on 7 Sep 2018  路  7Comments  路  Source: getgrav/grav

Hey guys,

I see that HttpOnly and Secure flags are configurable in the configuration section.
Would it be possible to add a switch for the SameSite cookie flag ?

Thanks a lot and keep up the great work,

ArnCo

bug fixed in repo

Most helpful comment

Hey @hughbris ,

Here is an explanation of what it does :
https://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/
Basically, this is an additional protection against CSRF.

Cheers,
ArnCo

All 7 comments

Could you please explain this or link to something that does?

Hey @hughbris ,

Here is an explanation of what it does :
https://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/
Basically, this is an additional protection against CSRF.

Cheers,
ArnCo

image
Guyz, hello, i too dont search any option to set this Cookie, may be you have any advices? Thanx.

Hi @lovkiymusic,

For now I'm doing it directly on my NginX server with the "proxy_cookie_path" directive.

Cheers,

ArnCo

+1

would be great if we could set the samesite attribute for cookies in the system.yaml like the others attribute. example:

session:
enabled: true
initialize: true
timeout: 1800
name: site-
uniqueness: path
secure: true
httponly: true
split: true
path: null
samesite: true

See #3063

Looks like this can be closed, given the previous comment. Cheers :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

escopecz picture escopecz  路  17Comments

balajmarius picture balajmarius  路  17Comments

jens-t picture jens-t  路  18Comments

giansi picture giansi  路  17Comments

ekumlin picture ekumlin  路  37Comments