From fa7628666fd0641e148abe75e751c5c8a5f0c384 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Fri, 7 Oct 2022 16:32:03 +0200 Subject: [PATCH] enh(auth): autologin enhancement (#11957) Refs: MON-15384 --- www/class/centreonAuth.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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