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:
parent
a8f765fa3b
commit
b118e9679d
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue