vuestorefront-community / prestashop

Convert your traditional PrestaShop website into a fast, mobile friendly and modern website.
MIT License
50 stars 31 forks source link

[Bug]: PrestaShop set two cookies and caused problems with session management #137

Closed samberrry closed 11 months ago

samberrry commented 11 months ago

Actual Behavior

When PrestaShop website tries to set two cookies we will encounter issues. However, according to the documentation we must have only one cookie: https://devdocs.prestashop-project.org/8/development/components/cookie/#limits

PrestaShop will create only one cookie, in the $_COOKIE array, with each key and value data appended to a string and finally encrypted for safety reasons.

Screen Shot 2023-08-12 at 12 05 29 PM

How I encountered the issue?

When I logged into the shop and tried to do an add to cart/ or checking account info, the user will be logged out on front-end. Why? because it uses wrong cookie.

samberrry commented 11 months ago

I think we should not handle this situation on front-end.

samberrry commented 11 months ago

third-party modules can cause having many cookies: https://github.com/PrestaShop/PrestaShop/issues/29868

samberrry commented 11 months ago

This issue is not related to front, it must be fixed on back-end instance, so I close it.