mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-14 08:54:21 +01:00
fix dangerous sql injection #3327
This commit is contained in:
@@ -384,12 +384,12 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]);
|
||||
$object->entity = (GETPOST('entity', 'int') ? 0 : GETPOST('entity', 'int'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$object->entity = (empty($_POST["entity"]) ? 0 : $_POST["entity"]);
|
||||
$object->entity = (GETPOST('entity', 'int') ? 0 : GETPOST('entity', 'int'));
|
||||
}
|
||||
|
||||
if (GETPOST('deletephoto')) $object->photo='';
|
||||
|
||||
@@ -1217,7 +1217,7 @@ class User extends CommonObject
|
||||
if (isset($this->salary) || $this->salary != '') $sql.= ", salary= ".($this->salary != ''?"'".$this->db->escape($this->salary)."'":"null");
|
||||
if (isset($this->salaryextra) || $this->salaryextra != '') $sql.= ", salaryextra= ".($this->salaryextra != ''?"'".$this->db->escape($this->salaryextra)."'":"null");
|
||||
$sql.= ", weeklyhours= ".($this->weeklyhours != ''?"'".$this->db->escape($this->weeklyhours)."'":"null");
|
||||
$sql.= ", entity = '".$this->entity."'";
|
||||
$sql.= ", entity = '".$this->db->escape($this->entity)."'";
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
|
||||
Reference in New Issue
Block a user