diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-21 13:59:10 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-21 13:59:10 +0100 |
commit | 9a32672c2600b8b0414eae6527c6ed9263c1e2c7 (patch) | |
tree | e6508171c09fc39f93382b87a49e3cab4c6cb5ae /apps | |
parent | 17025d6f814f1b7db6077df21d1740282766cf92 (diff) | |
download | nextcloud-server-9a32672c2600b8b0414eae6527c6ed9263c1e2c7.tar.gz nextcloud-server-9a32672c2600b8b0414eae6527c6ed9263c1e2c7.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')
-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, |