diff --git a/wwwroot/inc/auth.php b/wwwroot/inc/auth.php index ff31aa955..498b970a1 100644 --- a/wwwroot/inc/auth.php +++ b/wwwroot/inc/auth.php @@ -35,6 +35,9 @@ function authenticate () if (isset ($_SESSION['logout'])) { unset($_SESSION['logout']); + unset($_SERVER['PHP_AUTH_USER']); + unset($_SERVER['PHP_AUTH_PW']); + if (isset ($user_auth_src) and 'saml' == $user_auth_src) saml_logout (); throw new RackTablesError ('', RackTablesError::NOT_AUTHENTICATED); // Reset browser credentials cache. diff --git a/wwwroot/inc/interface.php b/wwwroot/inc/interface.php index f4b230abb..29c5b246b 100644 --- a/wwwroot/inc/interface.php +++ b/wwwroot/inc/interface.php @@ -85,12 +85,8 @@ function showLogoutURL () { $https = (isset ($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') ? 's' : ''; $port = (! in_array ($_SERVER['SERVER_PORT'], array (80, 443))) ? ':' . $_SERVER['SERVER_PORT'] : ''; - $pathinfo = pathinfo ($_SERVER['REQUEST_URI']); - $dirname = $pathinfo['dirname']; - // add a trailing slash if the installation resides in a subdirectory - if ($dirname != '/') - $dirname .= '/'; - printf ('http%s://logout@%s%s?logout', $https, $_SERVER['SERVER_NAME'], $dirname); + $uri = explode('?',$_SERVER['REQUEST_URI']); + printf ('http%s://%s%s?logout', $https, $_SERVER['SERVER_NAME'], $uri[0]); } $quick_links = NULL; // you can override this in your local.php, but first initialize it with getConfiguredQuickLinks()