diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-01-20 12:42:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 12:42:21 +0300 |
commit | 86fda905c593f7d6e1603dcc25ef82b17338ab6f (patch) | |
tree | b055ad5fe83274ae78fecc7b19dff286713c5ad1 /apps | |
parent | 301ecd0fc038060d8aa1683a4e09f882b99d239f (diff) | |
parent | 1bc2905a4df83ac7d7084274c42623b8b7c1fd40 (diff) |
Merge pull request #30693 from nextcloud/backport/29923/stable21
Diffstat (limited to 'apps')
-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 5344bf5f78c..c84408c75c8 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'), |