Open
Description
Preconditions and environment
- Magento version 2.4.5-p1
Steps to reproduce
- From browser and Magento instance
- Create customer and login
- Add any product to cart
- Swap to graphql/altair/postman
- Use
generateCustomerToken
mutation to create graphql authorization token - Use
customerCart
query with the authorization token to retrieve details of the user's current cart - Take note of the cart_id and cart_item_id
- Use 'removeItemFromCart` mutation without the authorization token to remove the item from the cart (error received)
- Return to browser and Magento instance
- Refresh page to see that supposedly no changes have been made to the cart
- Add another product to the cart to trigger a more thorough update
Expected result
The cart should have 2 products in it. The 3rd unauthorized mutation should not modify the user's cart. An authorization token should always be required to modify a signed in user's cart.
Actual result
The cart item is removed from the user's cart upon a more thorough cart update from the browser Luma storefront. The removeItemFromCart
mutation without an authorization token was still able to modify the user's cart.
Even though the message returned from the API says the "user cannot perform operations on the cart" because the authorization token is not supplied, in the background the item has been removed from the cart.
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.