From e0a269a3e5c320f8ba346e5c3798ec53a8f41a55 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Mon, 19 Jun 2017 21:15:31 +0200 Subject: [PATCH] baculum: Fix working logout button --- gui/baculum/protected/Web/Pages/WebHome.page | 2 +- gui/baculum/protected/Web/Pages/WebHome.php | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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(); } } -- 2.39.5