Backport sql injection fix from develop
This commit is contained in:
parent
531037ddb6
commit
2e3b6b2fc8
@ -678,8 +678,8 @@ class Facture extends CommonInvoice
|
||||
$sql .= ", ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'" : "null");
|
||||
$sql .= ", ".($user->id > 0 ? (int) $user->id : "null");
|
||||
$sql .= ", ".($this->fk_project ? $this->fk_project : "null");
|
||||
$sql .= ", ".$this->cond_reglement_id;
|
||||
$sql .= ", ".$this->mode_reglement_id;
|
||||
$sql .= ", ".((int) $this->cond_reglement_id);
|
||||
$sql .= ", ".((int) $this->mode_reglement_id);
|
||||
$sql .= ", '".$this->db->idate($this->date_lim_reglement)."'";
|
||||
$sql .= ", ".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null");
|
||||
$sql .= ", ".($this->situation_cycle_ref ? "'".$this->db->escape($this->situation_cycle_ref)."'" : "null");
|
||||
|
||||
@ -725,8 +725,8 @@ if (empty($reshook)) {
|
||||
$object->date_echeance = $datedue;
|
||||
$object->note_public = GETPOST('note_public', 'restricthtml');
|
||||
$object->note_private = GETPOST('note_private', 'restricthtml');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id', 'int');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
|
||||
$object->fk_account = GETPOST('fk_account', 'int');
|
||||
$object->fk_project = ($tmpproject > 0) ? $tmpproject : null;
|
||||
$object->fk_incoterms = GETPOST('incoterm_id', 'int');
|
||||
@ -736,7 +736,7 @@ if (empty($reshook)) {
|
||||
$object->transport_mode_id = GETPOST('transport_mode_id', 'int');
|
||||
|
||||
// Proprietes particulieres a facture de remplacement
|
||||
$object->fk_facture_source = GETPOST('fac_replacement');
|
||||
$object->fk_facture_source = GETPOST('fac_replacement', 'int');
|
||||
$object->type = FactureFournisseur::TYPE_REPLACEMENT;
|
||||
|
||||
$id = $object->createFromCurrent($user);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user