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()
|
||||
{
|
||||
$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…
Reference in New Issue