Fix sql injection
This commit is contained in:
parent
cad9a59d2a
commit
348ab4765c
@ -40,7 +40,7 @@ $type = GETPOST('type', 'az09');
|
|||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$removeelem = GETPOST('removeelem', 'int');
|
$removeelem = GETPOST('removeelem', 'int');
|
||||||
$elemid = GETPOST('elemid', 'alpha');
|
$elemid = GETPOST('elemid', 'int');
|
||||||
|
|
||||||
if ($id == "" && $label == "")
|
if ($id == "" && $label == "")
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2052,7 +2052,7 @@ class Product extends CommonObject
|
|||||||
$sql.= " fk_price_expression, price_autogen";
|
$sql.= " fk_price_expression, price_autogen";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$sql.= " WHERE rowid = ".$this->db->escape($id);
|
$sql.= " WHERE rowid = ".(int) $id;
|
||||||
} else {
|
} else {
|
||||||
$sql.= " WHERE entity IN (".getEntity($this->element).")";
|
$sql.= " WHERE entity IN (".getEntity($this->element).")";
|
||||||
if ($ref) {
|
if ($ref) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user