diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-02-06 10:20:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 10:20:56 +0100 |
commit | d2d7e37b7bf00ea7929da02459e4abb8640d064a (patch) | |
tree | c680bc9c86b2ebfc4160454204dc167a5d3ca7ce /apps/files_external | |
parent | daf6887c09b3b706728c5fdef6cb6df0640f1e21 (diff) | |
parent | 7e1d14d9a596c5d36c0f625bd944e44b073d10da (diff) | |
download | nextcloud-server-d2d7e37b7bf00ea7929da02459e4abb8640d064a.tar.gz nextcloud-server-d2d7e37b7bf00ea7929da02459e4abb8640d064a.zip |
Merge pull request #19312 from nextcloud/fix/18195/do-not-overwrite-user-glob-auth
do not overwrite global user auth credentials with empty values
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php index a0c7f91e6f7..9231e5b6a41 100644 --- a/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php +++ b/apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php @@ -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'], |