Skip to content

Commit c129815

Browse files
author
Anna Bukatar
committed
ACP2E-1513: Customer suspects IDOR vulnerability
1 parent 1c874bd commit c129815

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
8686
$itemId = $processedArgs['input']['cart_item_id'];
8787

8888
$storeId = (int)$context->getExtensionAttributes()->getStore()->getId();
89+
/** Check if the current user is allowed to perform actions with the cart */
90+
$this->getCartForUser->execute($maskedCartId, $context->getUserId(), $storeId);
8991

9092
try {
9193
$this->cartItemRepository->deleteById($cartId, $itemId);

0 commit comments

Comments
 (0)