-
Notifications
You must be signed in to change notification settings - Fork 110
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
Cookies with invalid SameSite will be rejected #1053
Comments
See also #976. Would the solution to add None when the Secure option is enabled? |
And set explicitly Lax for non-Secure connection? |
Well, of course a secure cookie would be correct! The warning appears because the SameSite policy for a cookie was not explicitly specified. |
This doesn't tell what SameSite to set. |
In order to answer something like this, one would first have to determine the reasons why one does not want to use TLS encryption here. |
If security is not required here and no server-side business logic is involved, then I would recommend alternative methods such as LocalStorage. |
We don't need to answer these questions about TLS or Secure. The question here is the SameSite, with Secure or without Secure. |
There's also |
Better explanations here: https://web.dev/samesite-cookies-explained/ Imo we can set |
Even if the cookie does not store sensitive data, the cookie should only be transmitted from the client via a secure HTTPS connection if the application (HTTPS, FORCE_SSL_ADMIN) is configured in this way. Another question is whether the cookie should be passed on for cross-domain requests. In the case of an unsecured HTTP connection, the SameSite policy is useful to avoid misconfigurations. In our production environments, data protection is very important and therefore these settings |
Again... why do you mention the secure HTTPS connection? There's an option in qTranslate-XT allowing to enable this. The The main topic is here is |
If the admin area is accessed via an HTTPS connection, only secure cookies should be used by default. In this case, the value for "SameSite" can remain on "None" by default. If the admin area is called via an HTTP connection, the value for "SameSite" must be set by default in the future. In this case, the "Lax" value is a good compromise. At installation time, the SameSite value cannot be determined for all use cases. |
Why would you want this for qTranslate? Think about the real use cases for admin and front cookies.
|
For the administration area I would of course always use "Strict" for "SameSite"! |
I don't see why this is so obvious. If you come to admin from a link you'd rather want the correct admin language to be set. |
Why should the cookie be sent for cross-domain requests? |
Anyway, that's my point of view. |
I don't know the exact consequences of not having the admin cookie set when coming back from a link. So by default you'd rather want this. This is supported by Lax, unlike Strict. The question is more why would you want to block it with Strict? First, you asked None which is the complete opposite. The need doesn't seem very clear. Please read this more carefully: https://web.dev/samesite-cookies-explained/ |
I don't think I need to go to school here! |
Me neither. You just wrote I will set Lax by default everywhere unless someone finds a good reason for doing differently. |
Set SameSite explicitly to avoid future browser rejection. The options API requires PHP 7.3+.
Set SameSite explicitly to avoid future browser rejection. The options API requires PHP 7.3.0+.
The only thing that is now "by default" is the new potential for misconfigurations (HTTPS, SameSite), of course, hard-coded.
It's a real shame that nobody is involved here! |
Please change this tone, these are not constructive comments. |
The current default behavior for |
Here's a more flexible approach.
|
Added a constant, but without check. We want to set the policy explicitly from now.
In fact, all the modern browsers have raised their default |
Regarding the very potential future cases:
Almost 2 years have passed already without anyone needing any of this. |
Of course you can see it that way. Especially for backend cookies. Frontend cookies have a different attention due to privacy issues. Regardless of whether this is relevant from a security point of view. Technical requirements etc. I would really like to end this topic now. |
But you don't.
My explanations are valid both for the admin and frontend. Since the beginning you have been mentioning The topic is |
Specifications on customer side (agencies) regardless of our opinion! I will adjust the plugin itself after each update. So don't worry about me! The SameSite property has several values for a reason. |
Have you been changing them until now? |
Released in 3.11.0. |
The "qtrans_admin_language" cookie will soon be rejected because it specifies either "None" or an invalid value for the "SameSite" attribute without using the "secure" attribute. For more information on the "SameSite" attribute, see https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite.
The text was updated successfully, but these errors were encountered: