mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 02:00:51 -04:00
Return correct loginname in credentials,
even when token is invalid or has no password. Returning the uid as loginname is wrong, and leads to problems when these differ. E.g. the getapppassword API was creating app token with the uid as loginname. In a scenario with external authentication (such as LDAP), these tokens were then invalidated next time their underlying password was checked, and systematically ceased to function. Signed-off-by: Lionel Elie Mamane <lionel@mamane.lu>
This commit is contained in:
parent
95ef2ca2eb
commit
f7f053b101
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ class Store implements IStore {
|
|||
|
||||
if ($trySession && $this->session->exists('login_credentials')) {
|
||||
$creds = json_decode($this->session->get('login_credentials'));
|
||||
return new Credentials($creds->uid, $creds->uid, $creds->password);
|
||||
return new Credentials($creds->uid, $this->session->get('loginname'), $creds->password);
|
||||
}
|
||||
|
||||
// If we reach this line, an exception was thrown.
|
||||
|
|
|
|||
Loading…
Reference in a new issue