diff --git a/SECURITY.md b/SECURITY.md index 3c7fabd4d7c..6c2940d315b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -14,7 +14,7 @@ To report a vulnerability, for a private report, you can: - Send your report as an issue on https://github.com/Dolibarr/dolibarr/issues or on GitHub Vulnerability Disclosure Program tool (VDP): https://github.com/Dolibarr/dolibarr/security/advisories (recommended). Do 1 report only per vulnerability. Reports combining several vulnerabilities, as well as reports generated using IA will be rejected. -WARNING: This is a private vulnerability report process: Advisory is sent to users by our internal channel (RSS at https://cti.dolibarr.org/index-security.rss), not via public CVE reports. +NOTE: This is a private vulnerability report process: Advisories are sent to users by our internal channel (RSS at https://cti.dolibarr.org/index-security.rss), we do not publish CVE reports. '."\n"; if ($idprod > 0) { - $producttmp = new ProductFournisseur($db); - $producttmp->fetch($idprod); - $sorttouse = 's.nom, pfp.quantity, pfp.price'; if (GETPOST('bestpricefirst')) { $sorttouse = 'pfp.unitprice, s.nom, pfp.quantity, pfp.price'; } - $productSupplierArray = $producttmp->list_product_fournisseur_price($idprod, $sorttouse); // We list all price per supplier, and then firstly with the lower quantity. So we can choose first one with enough quantity into list. + $productSupplierArray = $object->list_product_fournisseur_price($idprod, $sorttouse); // We list all price per supplier, and then firstly with the lower quantity. So we can choose first one with enough quantity into list. if (is_array($productSupplierArray)) { foreach ($productSupplierArray as $productSupplier) { if (getDolGlobalInt("DISABLE_BAD_REPUTATION_PRODUCT_PRICE") && $productSupplier->supplier_reputation == "DONOTORDER") { @@ -130,11 +150,11 @@ if ($idprod > 0) { // After best supplier prices and before costprice if (isModEnabled('stock')) { // Add price for pmp - $price = $producttmp->pmp; + $price = $object->pmp; if (empty($price) && getDolGlobalString('PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY')) { // get pmp for subproducts if any - $producttmp->get_sousproduits_arbo(); - $prods_arbo=$producttmp->get_arbo_each_prod(); + $object->get_sousproduits_arbo(); + $prods_arbo = $object->get_arbo_each_prod(); if (!empty($prods_arbo)) { $price = 0; foreach ($prods_arbo as $child) { @@ -149,11 +169,11 @@ if ($idprod > 0) { } // Add price for costprice (at end) - $price = $producttmp->cost_price; + $price = $object->cost_price; if (empty($price) && getDolGlobalString('PRODUCT_USE_SUB_COST_PRICES_IF_COST_PRICE_EMPTY')) { // get costprice for subproducts if any - $producttmp->get_sousproduits_arbo(); - $prods_arbo=$producttmp->get_arbo_each_prod(); + $object->get_sousproduits_arbo(); + $prods_arbo = $object->get_arbo_each_prod(); if (!empty($prods_arbo)) { $price = 0; foreach ($prods_arbo as $child) {