Skip to content

form_key cookie expires immediately if cookie lifetime is set to 0 #10527

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

Closed
ekuusela opened this issue Aug 14, 2017 · 7 comments
Closed

form_key cookie expires immediately if cookie lifetime is set to 0 #10527

ekuusela opened this issue Aug 14, 2017 · 7 comments
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release

Comments

@ekuusela
Copy link
Contributor

form_key cookie expires immediately if cookie lifetime is set to 0. This causes for example the minicart remove button to not function.

Preconditions

Magento 2.1.8 with cookie lifetime set to 0, i.e. expire when the session ends.

Steps to reproduce

  1. Set cookie lifetime to 0 in Stores -> Configuration -> General -> Web
  2. Navigate to a product page and add a product to cart
  3. Wait until the page has been fully loaded. Observe with browser dev tools that form_key cookie is not present.
  4. Try to remove the product using the minicart.
  5. Note that product is not removed.

Expected result

  1. form_key cookie should be valid until session is closed.
  2. minicart remove button should work.

Actual result

  1. form_key cookie expires upon ajax request to /banner/ajax/load/?sections
  2. minicart remove button does not work.
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-71544

@magento-team magento-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report develop labels Aug 16, 2017
@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report develop Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team magento-engcom-team added Fixed in 2.3.x The issue has been fixed in 2.3 release line Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Sep 20, 2017
@magento-engcom-team
Copy link
Contributor

@ekuusela, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Sep 28, 2017
@magento-engcom-team
Copy link
Contributor

@ekuusela, thank you for your report.
The issue is already fixed in develop branch
But we will consider to backport the fix to patch releases

@magento-engcom-team
Copy link
Contributor

Hi @ekuusela the issue is already fixed in 2.2.1 and will be available soon

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Oct 6, 2017
@staradzinau
Copy link

Please, note: the issue is still reproduced on the 2.3.0, because of incorrect merge of modifications!

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Dec 12, 2018

Hi @TomashKhamlai. 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: 👇

  • 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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@TomashKhamlai TomashKhamlai removed their assignment Dec 12, 2018
@ghost ghost added Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release and removed bug report labels Dec 19, 2018
@bytes-commerce
Copy link

I still reproduce this issue in Magento ^2.4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release
Projects
None yet
Development

No branches or pull requests

7 participants