Magento2: "SameSite" field of a cookie, which can be either "None", "Lax" or "Strict" in Google Chrome

Created on 8 Jan 2020  路  9Comments  路  Source: magento/magento2

Preconditions (*)

  1. Any Magento versions

Steps to reproduce (*)

  1. Incrementally Better Cookies ("SameSite") will be released on February 2020 by Google Chrome team
  2. More info is here: https://www.youtube.com/watch?v=VnN8NwTeXAc

Expected result (*)

  1. Should be provided solution/workaround added to repo for all Magento2 vesrions so cookie will not stopped to work on sites running with magento 2 starting February 2020.

Actual result (*)

  1. From February 2020 will no any cookie work like it should in Google Chrome for Magento2 sites if SameSite not be fixed
Format is valid feature request

All 9 comments

Hi @anziv. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@anziv do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

I think this relates to Googles cookies (probably the ReCaptcha security). I think the security issue is with cross-site resources (coming from Googles server).

@devchris79 most ecommerce shops use some sort of third party cookie, so unfortunately most sites will be affected.
PHP only supports SameSite attribute from 7.3 https://www.php.net/manual/en/function.setcookie.php#refsect1-function.setcookie-changelog

I think this relates to Googles cookies (probably the ReCaptcha security). I think the security issue is with cross-site resources (coming from Googles server).

This has to do with all cookies which do not originate from the same URL not just google. this will have a massive impact on everyone. not long until it is rolled out and could have massive implications if people have not prepared. this change will affect user session cookies, payment gateway sessions and so much more

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

Hello @anziv @sdzhepa
This issue looks like a feature request.
@sdzhepa could you transfer this issue to the Feature requests repository?
Thanks for your collaboration!

@engcom-Charlie I wouldnt say this was a feature more of an essential as this is going to have a big impact on how people are going to be able to process orders as if the session cookies are not passed it is going to make it impossible to pass back data to magento

@engcom-Charlie feature?
From february 4th it will definitely be a bug when chrome 80 is released.

https://www.chromestatus.com/features/schedule

You can simulate with chrome://flags/ this functionality today.
Enable:
Cookies without SameSite must be secure

Closing this issue to centralise all the discussion in https://github.com/magento/magento2/issues/26377
Please reopen if needed.

Was this page helpful?
0 / 5 - 0 ratings