Skip to content
Snippets Groups Projects
Unverified Commit 76367c5c authored by Joas Schilling's avatar Joas Schilling
Browse files

Don't save credentials of another user

parent e22ce096
No related branches found
No related tags found
No related merge requests found
......@@ -79,6 +79,11 @@ class LoginCredentials extends AuthMechanism {
try {
$sessionCredentials = $this->credentialsStore->getLoginCredentials();
if ($sessionCredentials->getUID() !== $user->getUID()) {
// Can't take the credentials from the session as they are not the same user
throw new CredentialsUnavailableException();
}
$credentials = [
'user' => $sessionCredentials->getLoginName(),
'password' => $sessionCredentials->getPassword()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment