Fix escaping
This commit is contained in:
parent
0e6a3aa2be
commit
f154e893d9
@ -1872,20 +1872,18 @@ class Ticket extends CommonObject
|
|||||||
{
|
{
|
||||||
$contacts = array();
|
$contacts = array();
|
||||||
|
|
||||||
// Generation requete recherche
|
// Forge the search SQL
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."socpeople";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."socpeople";
|
||||||
$sql .= " WHERE entity IN (".getEntity('contact').")";
|
$sql .= " WHERE entity IN (".getEntity('contact').")";
|
||||||
if (!empty($socid)) {
|
if (!empty($socid)) {
|
||||||
$sql .= " AND fk_soc='".$this->db->escape($socid)."'";
|
$sql .= " AND fk_soc = ".((int) $socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($email)) {
|
if (!empty($email)) {
|
||||||
$sql .= " AND ";
|
$sql .= " AND ";
|
||||||
|
|
||||||
if (!$case) {
|
if (!$case) {
|
||||||
$sql .= "email LIKE '".$this->db->escape($email)."'";
|
$sql .= "email = '".$this->db->escape($email)."'";
|
||||||
} else {
|
} else {
|
||||||
$sql .= "email LIKE BINARY '".$this->db->escape($email)."'";
|
$sql .= "email LIKE BINARY '".$this->db->escape($this->db->escapeforlike($email))."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user