From 12f7ab6b01470fa8c291065fd078b380505cdec4 Mon Sep 17 00:00:00 2001 From: akhil Date: Mon, 8 Nov 2021 19:03:01 +0530 Subject: [PATCH] Lowercase admin username before checking against input --- patches/002-login-without-domain.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/002-login-without-domain.patch b/patches/002-login-without-domain.patch index 6e670628..477bd803 100644 --- a/patches/002-login-without-domain.patch +++ b/patches/002-login-without-domain.patch @@ -17,7 +17,7 @@ diff --git files/LoginController.php files/LoginController-new.php + $user = mb_strtolower($user, 'UTF-8'); + $domain = $this->config->getSystemValue("mail_domain"); + $domain_suffix = "@$domain"; -+ $admin_username = $_ENV["NEXTCLOUD_ADMIN_USER"]; ++ $admin_username = mb_strtolower($_ENV["NEXTCLOUD_ADMIN_USER"], 'UTF-8'); + if (stristr($user, $domain_suffix) === FALSE && strcmp($user, $admin_username) != 0) { + $user = $user . $domain_suffix; + } -- GitLab