diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-21 13:59:10 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-01-22 08:58:20 +0000 |
commit | fc3b256dda4b8aeb0a4534f1cf0421f298ce3a12 (patch) | |
tree | 4162ec76ac69745537ced951692d89219c3c9d7a /apps/files_external | |
parent | 8cb7adc131ce9d0b123d2c4418fb7fbfd3ca5631 (diff) | |
download | nextcloud-server-fc3b256dda4b8aeb0a4534f1cf0421f298ce3a12.tar.gz nextcloud-server-fc3b256dda4b8aeb0a4534f1cf0421f298ce3a12.zip |
Fix accessing undefined offsets
Move this to inside the else clause of the count($matches)
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Backend/SMB.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_external/lib/Lib/Backend/SMB.php b/apps/files_external/lib/Lib/Backend/SMB.php index 57ee866f3c7..70eaa206483 100644 --- a/apps/files_external/lib/Lib/Backend/SMB.php +++ b/apps/files_external/lib/Lib/Backend/SMB.php @@ -108,14 +108,12 @@ class SMB extends Backend { if (empty($realm)) { $realm = 'WORKGROUP'; } - $userPart = $matches[1]; - $domainPart = $matches[2]; if (count($matches) === 0) { $username = $user; $workgroup = $realm; } else { - $username = $userPart; - $workgroup = $domainPart; + $username = $matches[1];; + $workgroup = $matches[2]; } $smbAuth = new BasicAuth( $username, |