Closed auge8472 closed 8 months ago
Do we need to adapt the session function itself
session_set_cookie_params(['samesite' => 'strict']);
session_start();
or the setcookie function affected, too?
Do we need to adapt the session function itself
session_set_cookie_params(['samesite' => 'strict']); session_start();
or the setcookie function affected, too?
As far as I can see in the console of the development tools of my browser (Firefox), only the autologin cookie is affected.
Cookie “mlf2424_auto_login” does not have a proper “SameSite” attribute value. …
I would expect to get a warning message for all affected cookies at once. So I must assume, that it's only the mentioned one.
Well, afaik the auto_login cookie is set via setcookie, i.e. login.inc.php#L65. This is not the session cookie, isn't it?
This is not the session cookie, isn't it?
No, it's not. It's the cookie, that should prevent one from login every single browser session.
So, we have to add the SameSite attribute via calling setcookie, too
I added the attribute to the session cookie as well as to the user-setting cookie. I hope I haven't missed any setcookie
call.
When looking into the developer tools of my browser and requesting my testing forum I encountered warnings about lacking the cookie attribute
SameSite
.translated with deepl.com:
Additionally there is a link to the MDN-manual-page for cookies, section SameSite.
Because our cookies are internal and not intended to be sent to any third-party providers, we do not need to use the proposed value
None
. For our purposes the valueStrict
seems to be the correct one.Important to mention: I do not see the warning, when opening a page in the project forum on mylittleforum.net.