mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-13 11:35:51 +01:00
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
This commit is contained in:
parent
f3dbf1e139
commit
f6b27cc5f9
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -79,7 +79,7 @@
|
|||
{
|
||||
<script>
|
||||
var mainContent = document.getElementById("mainContent");
|
||||
if (window.location.protocol != "@(expectedScheme):" || window.location.host != "@expectedHost")
|
||||
if (window.location.protocol != "@(expectedScheme):" || window.location.host.toLowerCase() != "@expectedHost")
|
||||
{
|
||||
var tmpl = document.getElementById("badUrl");
|
||||
mainContent.prepend(tmpl.content.cloneNode(true));
|
||||
|
|
Loading…
Add table
Reference in a new issue