diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4e46f88bb23..f6719809fbb 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -664,7 +664,7 @@ class Contact extends CommonObject $sql .= ", phone = ".(isset($this->phone_pro) ? "'".$this->db->escape($this->phone_pro)."'" : "NULL"); $sql .= ", phone_perso = ".(isset($this->phone_perso) ? "'".$this->db->escape($this->phone_perso)."'" : "NULL"); $sql .= ", phone_mobile = ".(isset($this->phone_mobile) ? "'".$this->db->escape($this->phone_mobile)."'" : "NULL"); - $sql .= ", priv = '".$this->db->escape($this->priv)."'"; + $sql .= ", priv = ".((int) $this->priv); $sql .= ", fk_prospectlevel = '".$this->db->escape($this->fk_prospectlevel)."'"; if (isset($this->stcomm_id)) { $sql .= ", fk_stcommcontact = ".($this->stcomm_id > 0 || $this->stcomm_id == -1 ? $this->stcomm_id : "0"); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 6a0e5de24da..b5ed5542749 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -245,7 +245,7 @@ function dolDecrypt($chain, $key = '') * Use 'md5' if hash is not needed for security purpose. For security need, prefer 'auto'. * @param int $nosalt Do not include any salt * @param int $mode 0=Return encoded password, 1=Return array with encoding password + encoding algorithm - * @return string|array Hash of string or array with pass_encrypted and pass_encoding + * @return string|array{pass_encrypted:string,pass_encoding:string} Hash of string or array with pass_encrypted and pass_encoding * @see getRandomPassword(), dol_verifyHash() */ function dol_hash($chain, $type = '0', $nosalt = 0, $mode = 0) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 86737d3defc..8c6673a2bbc 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -33,7 +33,7 @@ */ function dolStripPhpCode($str, $replacewith = '') { - $str = str_replace(' 0) { foreach ($filter as $key => $value) { if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') { - $sqlwhere[] = $key.'='.((int) $value); - } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { - $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; + $sqlwhere[] = $this->db->sanitize($key).' = '.((int) $value); + } elseif (!empty($this->fields[$key]) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + $sqlwhere[] = $this->db->sanitize($key)." = '".$this->db->idate($value)."'"; } elseif ($key == 'customsql') { $sqlwhere[] = $value; } elseif (strpos($value, '%') === false) { - $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + $sqlwhere[] = $this->db->sanitize($key).' IN ('.$this->db->sanitize($this->db->escape($value)).')'; } else { - $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'"; + $sqlwhere[] = $this->db->sanitize($key)." LIKE '%".$this->db->escape($value)."%'"; } } } diff --git a/htdocs/langs/fr_FR/website.lang b/htdocs/langs/fr_FR/website.lang index c8aece70148..24e56e6ac0b 100644 --- a/htdocs/langs/fr_FR/website.lang +++ b/htdocs/langs/fr_FR/website.lang @@ -257,6 +257,7 @@ logOutFromYourCustomerAccount=Déconnectez-vous de votre compte client filteredByVersion=Filtré par version removeFilter=Supprimer filtre viewMyCart=Voir mon panier +Shipping=Expédition freeShipping=Expédition gratuite ! noProducts=Aucun produits nbrItemsInCart=Il y a 0 articles dans votre panier. diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index afd7e020886..01a3f1d4824 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -28,6 +28,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) { @phan-var-force string $colorblind_deuteranopes_badgeWarning '; ?> + +/* IDE Hack