mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 15:21:00 -04:00
Fix accessing undefined offsets
Move this to inside the else clause of the count($matches) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
parent
7acd13d002
commit
627466a226
1 changed files with 2 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue