Merge pull request #19312 from nextcloud/fix/18195/do-not-overwrite-user-glob-auth

do not overwrite global user auth credentials with empty values
Этот коммит содержится в:
Roeland Jago Douma 2020-02-06 10:20:56 +01:00 коммит произвёл GitHub
родитель daf6887c09 7e1d14d9a5
Коммит d2d7e37b7b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -56,6 +56,11 @@ class UserGlobalAuth extends AuthMechanism {
}
public function saveBackendOptions(IUser $user, $id, $backendOptions) {
// backendOptions are set when invoked via Files app
// but they are not set when invoked via ext storage settings
if(!isset($backendOptions['user']) && !isset($backendOptions['password'])) {
return;
}
// make sure we're not setting any unexpected keys
$credentials = [
'user' => $backendOptions['user'],