Browse Source

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

do not overwrite global user auth credentials with empty values
tags/v19.0.0beta1
Roeland Jago Douma 4 years ago
parent
commit
d2d7e37b7b
No account linked to committer's email address
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php

+ 5
- 0
apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php View File

@@ -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'],

Loading…
Cancel
Save