Suppression des addslashes. En effet, les données ne doivent jamais contenir une valeur "transformée" de leur valeur mais c'est uniquement dans l'ordre insert que le addslashes doit etre ajouté. Ceci ces données peuvent etre manipulées par d'autres portions de code que le insert qui elle requiert la donnée d'origine.
This commit is contained in:
parent
c5a5f07e7b
commit
50dca584c4
@ -1007,8 +1007,7 @@ class Facture
|
|||||||
if (! $ventil) $ventil=0;
|
if (! $ventil) $ventil=0;
|
||||||
$soc = new Societe($this->db);
|
$soc = new Societe($this->db);
|
||||||
$soc->fetch($this->socidp);
|
$soc->fetch($this->socidp);
|
||||||
if($soc->tva_assuj == "0")
|
if($soc->tva_assuj == "0") $txtva ="0";
|
||||||
$txtva ="0";
|
|
||||||
dolibarr_syslog("facture.class.php:: txtva : ".$txtva);
|
dolibarr_syslog("facture.class.php:: txtva : ".$txtva);
|
||||||
if ($fk_product && ! $pu)
|
if ($fk_product && ! $pu)
|
||||||
{
|
{
|
||||||
@ -1059,13 +1058,13 @@ class Facture
|
|||||||
$rangmax = $row[0];
|
$rangmax = $row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
||||||
{
|
{
|
||||||
if (!$product_desc)
|
if (!$product_desc)
|
||||||
{
|
{
|
||||||
$product_desc = $desc;
|
$product_desc = $desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formatage des prix
|
// Formatage des prix
|
||||||
$price = price2num($price);
|
$price = price2num($price);
|
||||||
|
|||||||
@ -208,9 +208,9 @@ class Product
|
|||||||
if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';
|
if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';
|
||||||
|
|
||||||
$this->ref = trim(sanitize_string($this->ref));
|
$this->ref = trim(sanitize_string($this->ref));
|
||||||
$this->libelle = trim(addslashes($this->libelle));
|
$this->libelle = trim($this->libelle);
|
||||||
$this->description = trim(addslashes($this->description));
|
$this->description = trim($this->description);
|
||||||
$this->note = trim(addslashes($this->note));
|
$this->note = trim($this->note);
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."product ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."product ";
|
||||||
$sql .= " SET label = '" . addslashes($this->libelle) ."'";
|
$sql .= " SET label = '" . addslashes($this->libelle) ."'";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user