summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2020-02-06 00:14:29 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2020-02-06 00:14:29 +0100
commit7e1d14d9a596c5d36c0f625bd944e44b073d10da (patch)
tree6eca3e04b8768cdb50112ec360b2769422d6d2aa /apps/files_external/lib/Lib
parentf11e4c9ec44f4eeb25d921f7680e23024749358a (diff)
downloadnextcloud-server-7e1d14d9a596c5d36c0f625bd944e44b073d10da.tar.gz
nextcloud-server-7e1d14d9a596c5d36c0f625bd944e44b073d10da.zip
do not overwrite global user auth credentials with empty values
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_external/lib/Lib')
-rw-r--r--apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php5
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'],