Loading patches/002-login-without-domain.patch +6 −2 Original line number Diff line number Diff line Loading @@ -80,13 +80,17 @@ diff --git ./core/Controller/LoginController.php ./core/Controller/LoginControll --- ./lib/private/User/Session.php 2026-03-23 17:46:39.585001447 +0600 +++ ./lib/private/User/Session-new.php 2026-03-23 17:59:52.577453313 +0600 @@ -384,6 +384,10 @@ @@ -384,6 +384,14 @@ $remoteAddress = $request->getRemoteAddress(); $currentDelay = $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login'); + $mainDomain = $this->config->getSystemValue('main_domain', ''); + $legacyDomain = $this->config->getSystemValue('legacy_domain', ''); + $mainDomainSuffix = !empty($mainDomain) ? '@' . $mainDomain : ''; + // Don't replace legacy domain in login name + if ($mainDomain !== $legacyDomain) { + $user = str_replace($mainDomainSuffix, '', $user); + } + if ($this->manager instanceof PublicEmitter) { $this->manager->emit('\OC\User', 'preLogin', [$user, $password]); Loading Loading
patches/002-login-without-domain.patch +6 −2 Original line number Diff line number Diff line Loading @@ -80,13 +80,17 @@ diff --git ./core/Controller/LoginController.php ./core/Controller/LoginControll --- ./lib/private/User/Session.php 2026-03-23 17:46:39.585001447 +0600 +++ ./lib/private/User/Session-new.php 2026-03-23 17:59:52.577453313 +0600 @@ -384,6 +384,10 @@ @@ -384,6 +384,14 @@ $remoteAddress = $request->getRemoteAddress(); $currentDelay = $throttler->sleepDelayOrThrowOnMax($remoteAddress, 'login'); + $mainDomain = $this->config->getSystemValue('main_domain', ''); + $legacyDomain = $this->config->getSystemValue('legacy_domain', ''); + $mainDomainSuffix = !empty($mainDomain) ? '@' . $mainDomain : ''; + // Don't replace legacy domain in login name + if ($mainDomain !== $legacyDomain) { + $user = str_replace($mainDomainSuffix, '', $user); + } + if ($this->manager instanceof PublicEmitter) { $this->manager->emit('\OC\User', 'preLogin', [$user, $password]); Loading