Fix sql error
This commit is contained in:
parent
0d5c613008
commit
d93fbcd00b
@ -653,7 +653,7 @@ class ProductFournisseur extends Product
|
||||
$sql .= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")";
|
||||
$sql .= " AND pfp.fk_soc = s.rowid AND pfp.fk_product = p.rowid";
|
||||
$sql .= " AND s.status=1"; // only enabled company selected
|
||||
$sql .= " AND pfp.fk_product = ".$prodid;
|
||||
$sql .= " AND pfp.fk_product = ".((int) $prodid);
|
||||
if (empty($sortfield)) {
|
||||
$sql .= " ORDER BY s.nom, pfp.quantity, pfp.price";
|
||||
} else {
|
||||
|
||||
@ -150,7 +150,7 @@ function testSqlAndScriptInject($val, $type)
|
||||
$inj += preg_match('/"/i', $val); // We refused " in GET parameters value.
|
||||
}
|
||||
if ($type == 2) {
|
||||
$inj += preg_match('/[:;"\'<>\?\(\)]/', $val); // PHP_SELF is a file system (or url path without parameters). It can contains spaces.
|
||||
$inj += preg_match('/[:;"\'<>\?\(\){}\$%]/', $val); // PHP_SELF is a file system (or url path without parameters). It can contains spaces.
|
||||
}
|
||||
|
||||
return $inj;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user