Skip to content

Commit

Permalink
Merge pull request #30693 from nextcloud/backport/29923/stable21
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Jan 20, 2022
2 parents 301ecd0 + 1bc2905 commit 86fda90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/files_external/lib/Lib/Backend/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public function __construct(IL10N $l, Password $legacyAuth) {
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'),
Expand Down

0 comments on commit 86fda90

Please sign in to comment.