mirror of
https://github.com/grocy/grocy.git
synced 2025-08-14 17:54:40 +00:00
Fixed a (theoretical, not practically relevant for the target use case of Grocy) SQL injection possibility (closes #2259)
This commit is contained in:
@@ -892,7 +892,7 @@ class StockService extends BaseService
|
|||||||
return FindAllObjectsInArrayByPropertyValue($stockEntries, 'location_id', $locationId);
|
return FindAllObjectsInArrayByPropertyValue($stockEntries, 'location_id', $locationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetProductStockLocations($productId, $allowSubproductSubstitution = false)
|
public function GetProductStockLocations(int $productId, $allowSubproductSubstitution = false)
|
||||||
{
|
{
|
||||||
$sqlWhereProductId = 'product_id = ' . $productId;
|
$sqlWhereProductId = 'product_id = ' . $productId;
|
||||||
if ($allowSubproductSubstitution)
|
if ($allowSubproductSubstitution)
|
||||||
|
Reference in New Issue
Block a user