From: Marcin Haba Date: Mon, 19 Jun 2017 19:15:31 +0000 (+0200) Subject: baculum: Fix working logout button X-Git-Tag: Release-9.0.0~26 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0a269a3e5c320f8ba346e5c3798ec53a8f41a55;p=bacula%2Fbacula baculum: Fix working logout button --- diff --git a/gui/baculum/protected/Web/Pages/WebHome.page b/gui/baculum/protected/Web/Pages/WebHome.page index 0c1a89b68e..d2b8c60fb3 100644 --- a/gui/baculum/protected/Web/Pages/WebHome.page +++ b/gui/baculum/protected/Web/Pages/WebHome.page @@ -17,7 +17,7 @@ - + diff --git a/gui/baculum/protected/Web/Pages/WebHome.php b/gui/baculum/protected/Web/Pages/WebHome.php index 5f911962b6..4e2936516b 100644 --- a/gui/baculum/protected/Web/Pages/WebHome.php +++ b/gui/baculum/protected/Web/Pages/WebHome.php @@ -232,9 +232,8 @@ class WebHome extends BaculumWebPage } public function logout($sender, $param) { - $http_protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http'; - $fake_pwd = $this->getModule('web_config')->getRandomString(); - $this->switchToUser($http_protocol, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $this->User->getName(), $fake_pwd); + $fake_pwd = $this->getModule('misc')->getRandomString(); + $this->switchToUser($this->User->getName(), $fake_pwd); exit(); } }