Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions wwwroot/inc/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 2 additions & 6 deletions wwwroot/inc/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down