diff options
author | MichaIng <micha@dietpi.com> | 2022-01-17 23:20:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 23:20:42 +0300 |
commit | b4486d20f01b5d1dbfdb79fa057bc1861384dab6 (patch) | |
tree | 0901f8cbdf3347fae5be0e690c7b5e2edd0972c4 | |
parent | bc81ebd496903946267b333b04df49005e007ac8 (diff) | |
parent | 951b25e1279812dce08eb3db1509ad0a98a290bc (diff) |
Merge pull request #30692 from nextcloud/backport/29923/stable22
[stable22] Fix users can't login external mount user entered credentials not set
-rw-r--r-- | apps/files_external/lib/Lib/Backend/SMB.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index 73e6b67614b..867648824ac 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -76,6 +76,10 @@ class SMB extends Backend { public function manipulateStorageConfig(StorageConfig &$storage, IUser $user = null) { $auth = $storage->getAuthMechanism(); if ($auth->getScheme() === AuthMechanism::SCHEME_PASSWORD) { + if (!is_string($storage->getBackendOption('user')) || !is_string($storage->getBackendOption('password'))) { + throw new \InvalidArgumentException('user or password is not set'); + } + $smbAuth = new BasicAuth( $storage->getBackendOption('user'), $storage->getBackendOption('domain'), |