Sylius / ShopApiPlugin

Shop API for Sylius.
https://sylius.com
129 stars 89 forks source link

[BUG] Privacy / Security - Possible to access cart of other user and cart will not be restored on another device #609

Open AndreasA opened 4 years ago

AndreasA commented 4 years ago

Currently as long as one has the token it is possible to access the shopping cart. However, if it is assigned to a shop user this shouldn't be possible, e.g. I logged out of a public PC.

Accessing and modifying a cart that isn't mine just shouldn't be possible and as it is possible that a shipping address / billing address is assigned to it, it is even worse as this can be an issue regarding data protection / privacy laws.

Furthermore, when a user is logged in it should be possible to resume the previous cart without knowing its token, e.g. because the user switches devices.

Best would be a merge but as a first step it would be nice, if it is the same as it is in a default Sylius installation

lchrusciel commented 4 years ago

Can you provide list of situations and expected behaviours?

AndreasA commented 4 years ago

I can't think of all the needed scenarios but one thing I would expect: