From f6b27cc5f9fc60642a94dbe09b7f1b070a4a1dd2 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Sun, 2 Jul 2023 19:58:11 +0200 Subject: [PATCH] Compare domains in lowercase Domains are case-insensitive, so this comparision should be too. I encountered this issue with a Citadel user who accidentially named their domain an uppercase name (Pay.example.com), but browsers automatically converted it to pay.example.com --- BTCPayServer/Views/Shared/_Layout.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index 30d8cf27c..f5f05aadb 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -17,7 +17,7 @@ notificationDisabled = user?.DisabledNotifications == "all"; } var expectedScheme = _context.HttpContext.Request.Scheme; - var expectedHost = _context.HttpContext.Request.Host.ToString(); + var expectedHost = _context.HttpContext.Request.Host.ToString().ToLower(); } @@ -79,7 +79,7 @@ {