When webserver setting is missing regular authentication will be used

Check if the remote user is set and use regular authentication when the key is missing.

refs #5405
This commit is contained in:
Matthias Jentsch 2014-02-26 17:57:22 +01:00
parent a8f765fa3b
commit b118e9679d
2 changed files with 3 additions and 3 deletions

View File

@ -404,13 +404,13 @@ class Manager
$this->fromRemoteUser = true;
$this->authenticateFromSession();
if ($this->user !== null) {
if ($this->user->getUsername() !== $_SERVER["REMOTE_USER"]) {
if (array_key_exists('REMOTE_USER', $_SERVER) && $this->user->getUsername() !== $_SERVER["REMOTE_USER"]) {
// Remote user has changed, clear all sessions
$this->removeAuthorization();
}
return;
}
if ($_SERVER["REMOTE_USER"] !== null) {
if (array_key_exists('REMOTE_USER', $_SERVER) && $_SERVER["REMOTE_USER"]) {
$this->user = new User($_SERVER["REMOTE_USER"]);
$this->persistCurrentUser();
}

View File

@ -43,7 +43,7 @@ class PieChart implements Widget
*/
private $template =<<<'EOD'
<div data-icinga-component="app/piechart">
<div>
<img class='inlinepie' src="{url}" width={width} height={height}> </img>
</div>
EOD;