From dc3b1445c98e43612a555e01f980aba7b3a2dbe7 Mon Sep 17 00:00:00 2001 From: tuntoja <58987095+tuntoja@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:18:34 +0200 Subject: [PATCH] chore(release): merge hotfix-mon-15384 in 21.10.x (Centreon WEB 21.10.13) (#11981) * enh(auth): autologin enhancement (#11957) Refs: MON-15384 * update version to 21.10.13 Co-authored-by: Kevin Duret --- www/class/centreonAuth.class.php | 8 ++++++++ www/install/insertBaseConf.sql | 2 +- www/install/php/Update-21.10.13.php | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 www/install/php/Update-21.10.13.php diff --git a/www/class/centreonAuth.class.php b/www/class/centreonAuth.class.php index 09f9c92af1b..79fd0cad515 100644 --- a/www/class/centreonAuth.class.php +++ b/www/class/centreonAuth.class.php @@ -231,6 +231,14 @@ protected function checkPassword($password, $token = "", $autoImport = false) || $this->userInfos["contact_auth_type"] == "local" || $this->autologin ) { + if ( + array_key_exists('contact_oreon', $this->userInfos) + && $this->userInfos['contact_oreon'] !== '1' + ) { + $this->passwdOk = 0; + return; + } + if ($this->autologin && $this->userInfos["contact_autologin_key"] && $this->userInfos["contact_autologin_key"] === $token diff --git a/www/install/insertBaseConf.sql b/www/install/insertBaseConf.sql index 4e9c0e02a30..ddd061c5d74 100644 --- a/www/install/insertBaseConf.sql +++ b/www/install/insertBaseConf.sql @@ -2,7 +2,7 @@ -- Insert version -- -INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '21.10.12'); +INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '21.10.13'); -- -- Contenu de la table `contact` diff --git a/www/install/php/Update-21.10.13.php b/www/install/php/Update-21.10.13.php new file mode 100644 index 00000000000..8572f2a05df --- /dev/null +++ b/www/install/php/Update-21.10.13.php @@ -0,0 +1,20 @@ +