From f48eec2e9355e78e78eff8490793d4cb6d2e8b7a Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Wed, 5 Apr 2023 10:55:35 +0900 Subject: [PATCH] Fix: Redirecting to local absolute URL in wizard windows should work --- BTCPayServer/Extensions/UrlHelperExtensions.cs | 2 +- BTCPayServer/Views/Shared/ConfirmModal.cshtml | 2 +- BTCPayServer/Views/UIHome/RecoverySeedBackup.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/SignWithSeed.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletPSBT.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletReceive.cshtml | 2 +- BTCPayServer/Views/UIWallets/WalletSend.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletSendVault.cshtml | 4 ++-- BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/BTCPayServer/Extensions/UrlHelperExtensions.cs b/BTCPayServer/Extensions/UrlHelperExtensions.cs index 70426808e..4ebd335ae 100644 --- a/BTCPayServer/Extensions/UrlHelperExtensions.cs +++ b/BTCPayServer/Extensions/UrlHelperExtensions.cs @@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc return url; if (httpRequest is null) return null; - if (Uri.TryCreate(url, UriKind.Absolute, out var r) && r.Host.Equals(httpRequest.Host.Host)) + if (Uri.TryCreate(url, UriKind.Absolute, out var r) && r.Host.Equals(httpRequest.Host.Host) && (!httpRequest.IsHttps || r.Scheme == "https")) return url; return null; } diff --git a/BTCPayServer/Views/Shared/ConfirmModal.cshtml b/BTCPayServer/Views/Shared/ConfirmModal.cshtml index 5658f64bf..35a2f33bc 100644 --- a/BTCPayServer/Views/Shared/ConfirmModal.cshtml +++ b/BTCPayServer/Views/Shared/ConfirmModal.cshtml @@ -32,7 +32,7 @@ @if (!string.IsNullOrEmpty(Model.Action)) { -
+ @if (Model.RequireConfirm) { - + @@ -89,6 +89,6 @@ } else { - Done + Done } diff --git a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml index bc1e73dda..18ba6cb7b 100644 --- a/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml +++ b/BTCPayServer/Views/UIWallets/SignWithSeed.cshtml @@ -11,11 +11,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml index a032a9250..ff97b8b4c 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBT.cshtml @@ -13,11 +13,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml index cf340e054..ef710edea 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBTCombine.cshtml @@ -11,11 +11,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml index deea9e2d6..c54f6e353 100644 --- a/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletPSBTDecoded.cshtml @@ -77,11 +77,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml index 3a9bdec81..42998ee91 100644 --- a/BTCPayServer/Views/UIWallets/WalletReceive.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletReceive.cshtml @@ -18,7 +18,7 @@ } @section Navbar { - + } diff --git a/BTCPayServer/Views/UIWallets/WalletSend.cshtml b/BTCPayServer/Views/UIWallets/WalletSend.cshtml index d7b3acfc9..347300ff0 100644 --- a/BTCPayServer/Views/UIWallets/WalletSend.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSend.cshtml @@ -20,11 +20,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml b/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml index 184e34081..88893163e 100644 --- a/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSendVault.cshtml @@ -11,11 +11,11 @@ @section Navbar { @if (backUrl != null) { - + } - + } diff --git a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml index f3b11e39e..e4dafebc5 100644 --- a/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletSigningOptions.cshtml @@ -12,11 +12,11 @@ @section Navbar { @if (backUrl != null) { - + } - + }