mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
AutoLogin: Check the remote username against logged in user
fixes #6462
This commit is contained in:
parent
e2c761a7aa
commit
56a29354d3
@ -111,6 +111,13 @@ class Manager
|
|||||||
public function authenticateFromSession()
|
public function authenticateFromSession()
|
||||||
{
|
{
|
||||||
$this->user = Session::getSession()->get('user');
|
$this->user = Session::getSession()->get('user');
|
||||||
|
|
||||||
|
if ($this->user !== null && $this->user->isRemoteUser() === true) {
|
||||||
|
list($originUsername, $field) = $this->user->getRemoteUserInformation();
|
||||||
|
if (array_key_exists($field, $_SERVER) && $_SERVER[$field] !== $originUsername) {
|
||||||
|
$this->removeAuthorization();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user