Skip to content

Commit d2d7e37

Browse files
authored
Merge pull request #19312 from nextcloud/fix/18195/do-not-overwrite-user-glob-auth
do not overwrite global user auth credentials with empty values
2 parents daf6887 + 7e1d14d commit d2d7e37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/files_external/lib/Lib/Auth/Password/UserGlobalAuth.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public function __construct(IL10N $l, ICredentialsManager $credentialsManager) {
5656
}
5757

5858
public function saveBackendOptions(IUser $user, $id, $backendOptions) {
59+
// backendOptions are set when invoked via Files app
60+
// but they are not set when invoked via ext storage settings
61+
if(!isset($backendOptions['user']) && !isset($backendOptions['password'])) {
62+
return;
63+
}
5964
// make sure we're not setting any unexpected keys
6065
$credentials = [
6166
'user' => $backendOptions['user'],

0 commit comments

Comments
 (0)