Remove ronzz.org bypass

This commit is contained in:
the-djmaze 2026-11-04 00:32:53 +01:00
parent b017bd40df
commit b1bc5f76c4

View file

@ -14,15 +14,6 @@ trait Admin
public function IsAdminLoggined(bool $bThrowExceptionOnFalse = true) : bool
{
if ($this->Config()->Get('security', 'allow_admin_panel', true)) {
// [PATCH ronzz.org] OIDC bridge: nginx auth_request (webmail-admin.ronzz.org)
// sets X-NC-Admin after validating the Nextcloud session. Honored only on the
// dedicated admin host (admin_panel.host); the header is stripped/overridden
// at nginx for any other path.
if (!empty($_SERVER['HTTP_X_NC_ADMIN'])
&& \strtolower((string) $this->Config()->Get('admin_panel', 'host', '')) === \strtolower($this->Http()->GetHost()))
{
return true;
}
$sAdminKey = $this->getAdminAuthKey();
if ($sAdminKey && $this->Cacher(null, true)->Get(KeyPathHelper::SessionAdminKey($sAdminKey))) {
return true;