Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Fix for:Negative-quantity cart manipulation allows creation of orders with negative grand totals https://github.com/givanz/Vvveb/security/advisories/GHSA-75x2-j47j-mg8j reported by https://github.com/CyberWarrior9

givanze7f2843618f6
diff --git a/system/cart/cart.php b/system/cart/cart.php
index a36013f..af6e04f 100755
--- a/system/cart/cart.php
+++ b/system/cart/cart.php
@@ -396,6 +396,8 @@ class Cart {
$key = str_replace('"', '', $key);
+ $quantity = max(1, $quantity);
+
if (isset($this->products[$key])) {
$this->products[$key]['quantity'] += $quantity;
} else {