]> source.dussan.org Git - nextcloud-server.git/commitdiff
do not overwrite global user auth credentials with empty values 19312/head
authorArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 5 Feb 2020 23:14:29 +0000 (00:14 +0100)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Wed, 5 Feb 2020 23:14:29 +0000 (00:14 +0100)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php

index a0c7f91e6f7d41396a6d5b004159411e65e1767f..9231e5b6a41158fee73746648d069969aac1d976 100644 (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'],