From f1a222fbb3e68fe25c8c614b7722ccb2bacf0bc6 Mon Sep 17 00:00:00 2001 From: Wouter Samaey Date: Tue, 6 Jul 2021 10:35:42 +0200 Subject: [PATCH] New unit test to scan for external links/forms and if they have rel="noreferrer noopener" (#2668) * Unit test to check for (possibly) external links * Add rel="noreferrer noopener" to all external links so unit test passes * Update BTCPayServer.Tests/UnitTest1.cs Co-authored-by: Andrew Camilleri * Update BTCPayServer.Tests/UnitTest1.cs Co-authored-by: Andrew Camilleri * Fixed bad merge from master * PascalCasing Co-authored-by: Andrew Camilleri --- BTCPayServer.Tests/UnitTest1.cs | 71 ++++++++++++++++++- BTCPayServer/Views/Apps/ListApps.cshtml | 2 +- .../Views/Apps/UpdateCrowdfund.cshtml | 2 +- .../Views/Apps/UpdatePointOfSale.cshtml | 2 +- .../UpdateCoinSwitchSettings.cshtml | 2 +- BTCPayServer/Views/Error/404.cshtml | 4 +- BTCPayServer/Views/Error/406.cshtml | 4 +- BTCPayServer/Views/Error/417.cshtml | 4 +- BTCPayServer/Views/Error/429.cshtml | 4 +- BTCPayServer/Views/Error/500.cshtml | 4 +- BTCPayServer/Views/Error/502.cshtml | 4 +- .../GetStoreEthereumLikePaymentMethod.cshtml | 2 +- BTCPayServer/Views/Home/Home.cshtml | 14 ++-- .../Views/Home/RecoverySeedBackup.cshtml | 4 +- .../Views/Invoice/Checkout-Body.cshtml | 2 +- BTCPayServer/Views/Invoice/Checkout.cshtml | 2 +- BTCPayServer/Views/Invoice/Invoice.cshtml | 4 +- .../Views/Invoice/ListInvoices.cshtml | 6 +- BTCPayServer/Views/Invoice/PosData.cshtml | 2 +- BTCPayServer/Views/Manage/APIKeys.cshtml | 4 +- .../Views/Manage/EnableAuthenticator.cshtml | 8 +-- BTCPayServer/Views/Notifications/Index.cshtml | 2 +- .../PaymentRequest/EditPaymentRequest.cshtml | 2 +- .../PaymentRequest/GetPaymentRequests.cshtml | 2 +- .../PaymentRequest/ViewPaymentRequest.cshtml | 4 +- .../Views/PullPayment/ViewPullPayment.cshtml | 4 +- .../Server/CLightningRestServices.cshtml | 4 +- .../Views/Server/ConfiguratorService.cshtml | 2 +- .../Views/Server/DynamicDnsServices.cshtml | 2 +- BTCPayServer/Views/Server/Files.cshtml | 6 +- .../Server/LightningChargeServices.cshtml | 16 ++--- .../Server/LightningWalletServices.cshtml | 2 +- .../Views/Server/LndSeedBackup.cshtml | 2 +- BTCPayServer/Views/Server/LndServices.cshtml | 10 +-- BTCPayServer/Views/Server/Maintenance.cshtml | 2 +- BTCPayServer/Views/Server/P2PService.cshtml | 4 +- BTCPayServer/Views/Server/Policies.cshtml | 14 ++-- BTCPayServer/Views/Server/RPCService.cshtml | 4 +- BTCPayServer/Views/Server/Services.cshtml | 6 +- BTCPayServer/Views/Server/Theme.cshtml | 10 +-- .../BitcoinLikeMethodCheckoutNoScript.cshtml | 2 +- .../Bitcoin/ViewBitcoinLikePaymentData.cshtml | 2 +- BTCPayServer/Views/Shared/Confirm.cshtml | 2 +- .../Shared/Ethereum/UpdateChainConfig.cshtml | 6 +- .../ViewEthereumLikePaymentData.cshtml | 2 +- .../Shared/LayoutPartials/SyncModal.cshtml | 4 +- ...LightningLikeMethodCheckoutNoScript.cshtml | 2 +- .../Monero/ViewMoneroLikePaymentData.cshtml | 2 +- BTCPayServer/Views/Shared/PostRedirect.cshtml | 2 +- .../StoreIntegrationShopifyOption.cshtml | 2 +- .../Views/Shared/_BTCPaySupporters.cshtml | 8 +-- BTCPayServer/Views/Shared/_Layout.cshtml | 4 +- .../Shopify/EditShopifyIntegration.cshtml | 6 +- .../Views/Stores/CheckoutExperience.cshtml | 4 +- .../Views/Stores/ImportWallet/Xpub.cshtml | 2 +- BTCPayServer/Views/Stores/Integrations.cshtml | 8 +-- BTCPayServer/Views/Stores/ListTokens.cshtml | 4 +- BTCPayServer/Views/Stores/Rates.cshtml | 8 +-- .../Views/Stores/SetupLightningNode.cshtml | 2 +- BTCPayServer/Views/Stores/UpdateStore.cshtml | 14 ++-- .../Views/Stores/_GenerateWalletForm.cshtml | 6 +- .../Views/UserStores/ListStores.cshtml | 2 +- BTCPayServer/Views/Wallets/ListWallets.cshtml | 2 +- .../Views/Wallets/NewPullPayment.cshtml | 2 +- BTCPayServer/Views/Wallets/Payouts.cshtml | 2 +- .../Views/Wallets/PullPayments.cshtml | 2 +- BTCPayServer/Views/Wallets/WalletSend.cshtml | 6 +- .../Views/Wallets/WalletSigningOptions.cshtml | 2 +- .../Views/Wallets/WalletTransactions.cshtml | 6 +- 69 files changed, 216 insertions(+), 149 deletions(-) diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index 409c4c3f9..ed9e7f941 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -206,12 +206,79 @@ namespace BTCPayServer.Tests List checkLinks = new List(); foreach (var file in viewFiles) { - checkLinks.Add(CheckLinks(regex, httpClient, file)); + checkLinks.Add(CheckDeadLinks(regex, httpClient, file)); } await Task.WhenAll(checkLinks); } + [Fact] + [Trait("Fast", "Fast")] + public async Task CheckExternalNoReferrerLinks() + { + var views = Path.Combine(TestUtils.TryGetSolutionDirectoryInfo().FullName, "BTCPayServer", "Views"); + var viewFiles = Directory.EnumerateFiles(views, "*.cshtml", SearchOption.AllDirectories).ToArray(); + Assert.NotEmpty(viewFiles); + + foreach (var file in viewFiles) + { + var html = await File.ReadAllTextAsync(file); + + CheckHtmlNodesForReferrer(file, html, "a", "href"); + CheckHtmlNodesForReferrer(file, html, "form", "action"); + } + } + + private void CheckHtmlNodesForReferrer(string filePath, string html, string tagName, string attribute) + { + Regex aNodeRegex = new Regex("<" + tagName + "\\s.*?>"); + var matches = aNodeRegex.Matches(html).OfType(); + + foreach (var match in matches) + { + var node = match.Groups[0].Value; + var attributeValue = GetAttributeValue(node, attribute); + + if (attributeValue != null) + { + if (attributeValue.Length == 0 || attributeValue.StartsWith("mailto:") || attributeValue.StartsWith("/") || attributeValue.StartsWith("~/") || attributeValue.StartsWith("#") || attributeValue.StartsWith("?") || attributeValue.StartsWith("javascript:") || attributeValue.StartsWith("@Url.Action(")) + { + // Local link, this is fine + } + else if (attributeValue.StartsWith("http://") || attributeValue.StartsWith("https://") || + attributeValue.StartsWith("@")) + { + // This can be an external link. Treating it as such. + var rel = GetAttributeValue(node, "rel"); + + // Building the file path + line number helps us to navigate to the wrong HTML quickly! + var lineNumber = html.Substring(0, html.IndexOf(node, StringComparison.InvariantCulture)).Split("\n").Length; + Assert.True(rel != null, "Template file \"" + filePath + ":" + lineNumber + "\" contains a possibly external link (" + node + ") that is missing rel=\"noreferrer noopener\""); + + if (rel != null) + { + // All external links should have 'rel="noreferrer noopener"' + var relWords = rel.Split(" "); + Assert.Contains("noreferrer", relWords); + Assert.Contains("noopener", relWords); + } + } + } + } + } + + private String GetAttributeValue(String nodeHtml, string attribute) + { + Regex regex = new Regex("\\s" + attribute + "=\"(.*?)\""); + var match = regex.Match(nodeHtml); + if (match.Success) + { + return match.Groups[1].Value; + } + + return null; + } + [Fact] [Trait("Integration", "Integration")] public async Task CheckSwaggerIsConformToSchema() @@ -286,7 +353,7 @@ namespace BTCPayServer.Tests } } - private static async Task CheckLinks(Regex regex, HttpClient httpClient, string file) + private static async Task CheckDeadLinks(Regex regex, HttpClient httpClient, string file) { List checkLinks = new List(); var text = await File.ReadAllTextAsync(file); diff --git a/BTCPayServer/Views/Apps/ListApps.cshtml b/BTCPayServer/Views/Apps/ListApps.cshtml index d5268697d..51432d3f6 100644 --- a/BTCPayServer/Views/Apps/ListApps.cshtml +++ b/BTCPayServer/Views/Apps/ListApps.cshtml @@ -16,7 +16,7 @@

@ViewData["PageTitle"] - + diff --git a/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml b/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml index 16c7039ea..a81e259d4 100644 --- a/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml +++ b/BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml @@ -98,7 +98,7 @@
- + diff --git a/BTCPayServer/Views/Apps/UpdatePointOfSale.cshtml b/BTCPayServer/Views/Apps/UpdatePointOfSale.cshtml index f69a0e3a4..2fb878100 100644 --- a/BTCPayServer/Views/Apps/UpdatePointOfSale.cshtml +++ b/BTCPayServer/Views/Apps/UpdatePointOfSale.cshtml @@ -69,7 +69,7 @@
- + diff --git a/BTCPayServer/Views/CoinSwitch/UpdateCoinSwitchSettings.cshtml b/BTCPayServer/Views/CoinSwitch/UpdateCoinSwitchSettings.cshtml index 738e75bfb..43921b9d2 100644 --- a/BTCPayServer/Views/CoinSwitch/UpdateCoinSwitchSettings.cshtml +++ b/BTCPayServer/Views/CoinSwitch/UpdateCoinSwitchSettings.cshtml @@ -17,7 +17,7 @@

You can obtain a merchant id at - + https://coinswitch.co/switch/setup/btcpay

diff --git a/BTCPayServer/Views/Error/404.cshtml b/BTCPayServer/Views/Error/404.cshtml index fa3499a04..622677057 100644 --- a/BTCPayServer/Views/Error/404.cshtml +++ b/BTCPayServer/Views/Error/404.cshtml @@ -3,9 +3,9 @@ ViewData["Title"] = "404 - Page not found"; } -This is like searching for a person more beautiful than Nicolas Dorier. +This is like searching for a person more beautiful than Nicolas Dorier.

- + Nicolas Dorier beauty

diff --git a/BTCPayServer/Views/Error/406.cshtml b/BTCPayServer/Views/Error/406.cshtml index 927d88a66..b1cf25ac1 100644 --- a/BTCPayServer/Views/Error/406.cshtml +++ b/BTCPayServer/Views/Error/406.cshtml @@ -6,7 +6,7 @@ Sorry, but our server can't service you.
Either set proper `Accept` header in HTTP request or find a new server.

- + Jack guiding you on what's acceptable

@@ -16,7 +16,7 @@ Either set proper `Accept` header in HTTP request or find a new server. - Jack invites you to learn how Bitcoin fixes this™ + Jack invites you to learn how Bitcoin fixes this™ diff --git a/BTCPayServer/Views/Error/417.cshtml b/BTCPayServer/Views/Error/417.cshtml index a225207fa..72e5f60e1 100644 --- a/BTCPayServer/Views/Error/417.cshtml +++ b/BTCPayServer/Views/Error/417.cshtml @@ -3,9 +3,9 @@ ViewData["Title"] = "417 - Expectation Failed"; } -You've unfortunately failed expectations of manager Pavlenex. Poor you. +You've unfortunately failed expectations of manager Pavlenex. Poor you.

- + Pavlenex avatar

diff --git a/BTCPayServer/Views/Error/429.cshtml b/BTCPayServer/Views/Error/429.cshtml index ca9f3850c..52124bc5b 100644 --- a/BTCPayServer/Views/Error/429.cshtml +++ b/BTCPayServer/Views/Error/429.cshtml @@ -3,9 +3,9 @@ ViewData["Title"] = "429 - Too Many Requests"; } -Please send requests slower. Or face the wrath of Vin Diesel. +Please send requests slower. Or face the wrath of Vin Diesel.

- + Vin is angry because you caused 429

diff --git a/BTCPayServer/Views/Error/500.cshtml b/BTCPayServer/Views/Error/500.cshtml index 151ecae12..b7338ea5e 100644 --- a/BTCPayServer/Views/Error/500.cshtml +++ b/BTCPayServer/Views/Error/500.cshtml @@ -3,9 +3,9 @@ ViewData["Title"] = "500 - Internal Server Error"; } -Whoops, something really went wrong! Mr Kukks is so sorry. +Whoops, something really went wrong! Mr Kukks is so sorry.

- + Mr Kukks puppy eyes

diff --git a/BTCPayServer/Views/Error/502.cshtml b/BTCPayServer/Views/Error/502.cshtml index 7095e07d7..08055a44b 100644 --- a/BTCPayServer/Views/Error/502.cshtml +++ b/BTCPayServer/Views/Error/502.cshtml @@ -6,8 +6,8 @@ The life is all about finding the right Gateways.
Unfortunately, this time you've found a bad one.

- + Miles obfuscated profile pic

-Maybe Gateway Tzar Miles can help you out? +Maybe Gateway Tzar Miles can help you out? diff --git a/BTCPayServer/Views/EthereumLikeStore/GetStoreEthereumLikePaymentMethod.cshtml b/BTCPayServer/Views/EthereumLikeStore/GetStoreEthereumLikePaymentMethod.cshtml index 18b6520cf..aaf09f18a 100644 --- a/BTCPayServer/Views/EthereumLikeStore/GetStoreEthereumLikePaymentMethod.cshtml +++ b/BTCPayServer/Views/EthereumLikeStore/GetStoreEthereumLikePaymentMethod.cshtml @@ -32,7 +32,7 @@
- Please see this article. + Please see this article.
diff --git a/BTCPayServer/Views/Home/Home.cshtml b/BTCPayServer/Views/Home/Home.cshtml index 25aeb30dc..85fc26318 100644 --- a/BTCPayServer/Views/Home/Home.cshtml +++ b/BTCPayServer/Views/Home/Home.cshtml @@ -9,7 +9,7 @@

Welcome to BTCPay Server


BTCPay Server is a free and open source server for merchants wanting to accept Bitcoin for their business.

- Official website + Official website @@ -55,7 +55,7 @@

Video tutorials

@@ -73,7 +73,7 @@ Support us by donating through BTCPay Server Foundation
or by directly sending donation to a specific contributor.

- + @@ -117,25 +117,25 @@

diff --git a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml index e54db6fb5..34bedbd3f 100644 --- a/BTCPayServer/Views/Invoice/Checkout-Body.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout-Body.cshtml @@ -60,7 +60,7 @@ @foreach (var crypto in Model.AvailableCryptos) {
  • - + @crypto.PaymentMethodName @crypto.PaymentMethodName @(crypto.IsLightning ? Html.Raw("⚡") : null) diff --git a/BTCPayServer/Views/Invoice/Checkout.cshtml b/BTCPayServer/Views/Invoice/Checkout.cshtml index 698e2ad27..95638636f 100644 --- a/BTCPayServer/Views/Invoice/Checkout.cshtml +++ b/BTCPayServer/Views/Invoice/Checkout.cshtml @@ -107,7 +107,7 @@ diff --git a/BTCPayServer/Views/Invoice/Invoice.cshtml b/BTCPayServer/Views/Invoice/Invoice.cshtml index 6350536dc..db28a840b 100644 --- a/BTCPayServer/Views/Invoice/Invoice.cshtml +++ b/BTCPayServer/Views/Invoice/Invoice.cshtml @@ -58,7 +58,7 @@ - + @@ -110,7 +110,7 @@ { - + }
    Store@Model.StoreName@Model.StoreName
    Invoice Id
    Redirect Url@Model.RedirectUrl@Model.RedirectUrl
    diff --git a/BTCPayServer/Views/Invoice/ListInvoices.cshtml b/BTCPayServer/Views/Invoice/ListInvoices.cshtml index c88701d3d..d7a8cfdfd 100644 --- a/BTCPayServer/Views/Invoice/ListInvoices.cshtml +++ b/BTCPayServer/Views/Invoice/ListInvoices.cshtml @@ -179,7 +179,7 @@

    @ViewData["Title"] - + @@ -321,7 +321,7 @@ - + @@ -359,7 +359,7 @@ @if (invoice.RedirectUrl != string.Empty) { - @invoice.OrderId + @invoice.OrderId } else { diff --git a/BTCPayServer/Views/Invoice/PosData.cshtml b/BTCPayServer/Views/Invoice/PosData.cshtml index 5d60dddb4..47e769a18 100644 --- a/BTCPayServer/Views/Invoice/PosData.cshtml +++ b/BTCPayServer/Views/Invoice/PosData.cshtml @@ -5,7 +5,7 @@ { if (value is string str && str.StartsWith("http")) { - @str + @str } else { diff --git a/BTCPayServer/Views/Manage/APIKeys.cshtml b/BTCPayServer/Views/Manage/APIKeys.cshtml index a5256e868..2cc29f6db 100644 --- a/BTCPayServer/Views/Manage/APIKeys.cshtml +++ b/BTCPayServer/Views/Manage/APIKeys.cshtml @@ -6,8 +6,8 @@

    The BTCPay Server Greenfield API offers programmatic access to your instance. You can manage your BTCPay - Server (e.g. stores, invoices, users) as well as automate workflows and integrations (see use case examples). - For that you need the API keys, which can be generated here. Find more information in the API authentication docs. + Server (e.g. stores, invoices, users) as well as automate workflows and integrations (see use case examples). + For that you need the API keys, which can be generated here. Find more information in the API authentication docs.

    diff --git a/BTCPayServer/Views/Manage/EnableAuthenticator.cshtml b/BTCPayServer/Views/Manage/EnableAuthenticator.cshtml index 349bd03fe..a350cae1f 100644 --- a/BTCPayServer/Views/Manage/EnableAuthenticator.cshtml +++ b/BTCPayServer/Views/Manage/EnableAuthenticator.cshtml @@ -11,13 +11,13 @@ diff --git a/BTCPayServer/Views/Notifications/Index.cshtml b/BTCPayServer/Views/Notifications/Index.cshtml index 8130c9ca1..82162d437 100644 --- a/BTCPayServer/Views/Notifications/Index.cshtml +++ b/BTCPayServer/Views/Notifications/Index.cshtml @@ -70,7 +70,7 @@ @@ -349,7 +349,7 @@ diff --git a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml index 0ca5676c9..b991e2992 100644 --- a/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml +++ b/BTCPayServer/Views/PullPayment/ViewPullPayment.cshtml @@ -162,7 +162,7 @@ } @@ -91,7 +91,7 @@ } @@ -143,7 +143,7 @@ } diff --git a/BTCPayServer/Views/Server/Theme.cshtml b/BTCPayServer/Views/Server/Theme.cshtml index 328fd96bc..80efc18de 100644 --- a/BTCPayServer/Views/Server/Theme.cshtml +++ b/BTCPayServer/Views/Server/Theme.cshtml @@ -26,7 +26,7 @@
    - + @@ -36,14 +36,14 @@

    Bootstrap theme

    @@ -51,7 +51,7 @@

    - Creative Start theme + Creative Start theme is used on top of Bootstrap

    diff --git a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckoutNoScript.cshtml b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckoutNoScript.cshtml index 87b665d01..cdd979e5b 100644 --- a/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckoutNoScript.cshtml +++ b/BTCPayServer/Views/Shared/Bitcoin/BitcoinLikeMethodCheckoutNoScript.cshtml @@ -3,6 +3,6 @@

    To complete payment, please send @Model.BtcDue @Model.CryptoCode to @Model.BtcAddress

    Time remaining: @Model.TimeLeft

    - @Model.InvoiceBitcoinUrl + @Model.InvoiceBitcoinUrl

    diff --git a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml index 18b9c268a..2ab8f25f6 100644 --- a/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml @@ -71,7 +71,7 @@ } diff --git a/BTCPayServer/Views/Wallets/PullPayments.cshtml b/BTCPayServer/Views/Wallets/PullPayments.cshtml index 22bac0a71..600372870 100644 --- a/BTCPayServer/Views/Wallets/PullPayments.cshtml +++ b/BTCPayServer/Views/Wallets/PullPayments.cshtml @@ -16,7 +16,7 @@

    @ViewData["Title"] - + diff --git a/BTCPayServer/Views/Wallets/WalletSend.cshtml b/BTCPayServer/Views/Wallets/WalletSend.cshtml index 58aa07779..444d75e46 100644 --- a/BTCPayServer/Views/Wallets/WalletSend.cshtml +++ b/BTCPayServer/Views/Wallets/WalletSend.cshtml @@ -179,7 +179,7 @@ @@ -188,7 +188,7 @@ @@ -197,7 +197,7 @@ {
    - +

    @if (!String.IsNullOrEmpty(item.ActionLink)) { - Details + Details - }
    - {{payment.id}} + {{payment.id}} {{payment.id}} @if (!string.IsNullOrEmpty(invoice.Link)) { - @invoice.Status.GetStateString() + @invoice.Status.GetStateString() } else { @@ -186,7 +186,7 @@ diff --git a/BTCPayServer/Views/Server/CLightningRestServices.cshtml b/BTCPayServer/Views/Server/CLightningRestServices.cshtml index 57ea90ad2..7e98c55d7 100644 --- a/BTCPayServer/Views/Server/CLightningRestServices.cshtml +++ b/BTCPayServer/Views/Server/CLightningRestServices.cshtml @@ -20,7 +20,7 @@
    Compatible wallets
    - + Zeus
    Zeus
    @@ -55,7 +55,7 @@
    - Click here to open the configuration file. + Click here to open the configuration file.
    } diff --git a/BTCPayServer/Views/Server/ConfiguratorService.cshtml b/BTCPayServer/Views/Server/ConfiguratorService.cshtml index 18a8b4e20..50832c61c 100644 --- a/BTCPayServer/Views/Server/ConfiguratorService.cshtml +++ b/BTCPayServer/Views/Server/ConfiguratorService.cshtml @@ -19,7 +19,7 @@

    - + diff --git a/BTCPayServer/Views/Server/DynamicDnsServices.cshtml b/BTCPayServer/Views/Server/DynamicDnsServices.cshtml index 6066bf39c..d862b3be1 100644 --- a/BTCPayServer/Views/Server/DynamicDnsServices.cshtml +++ b/BTCPayServer/Views/Server/DynamicDnsServices.cshtml @@ -14,7 +14,7 @@ This is recommended if you are hosting BTCPayServer at home and wish to have a clearnet HTTPS address to access your server.

    -

    Note that you need to properly configure your NAT and BTCPayServer install to get HTTPS certificate. Check the documentation for more information.

    +

    Note that you need to properly configure your NAT and BTCPayServer install to get HTTPS certificate. Check the documentation for more information.

    diff --git a/BTCPayServer/Views/Server/Files.cshtml b/BTCPayServer/Views/Server/Files.cshtml index 37f3ad809..3388ec306 100644 --- a/BTCPayServer/Views/Server/Files.cshtml +++ b/BTCPayServer/Views/Server/Files.cshtml @@ -12,7 +12,7 @@ choose your file storage service provider . - +

    @@ -21,7 +21,7 @@ else {

    Change your file storage service provider. - +

    @@ -83,7 +83,7 @@ else
  • Direct URL: - @Model.DirectFileUrl + @Model.DirectFileUrl
  • diff --git a/BTCPayServer/Views/Server/LightningChargeServices.cshtml b/BTCPayServer/Views/Server/LightningChargeServices.cshtml index 735be1325..2668c5367 100644 --- a/BTCPayServer/Views/Server/LightningChargeServices.cshtml +++ b/BTCPayServer/Views/Server/LightningChargeServices.cshtml @@ -14,14 +14,14 @@

    Lightning charge is a simple API for invoicing on lightning network, you can use it with several plugins:

      -
    • WooCommerce Lightning Gateway: A comprehensive e-commerce application that integrates with stock-management and order-tracking systems
    • -
    • Nanopos: A simple point-of-sale system for fixed-price goods
    • -
    • FileBazaar: A system for selling files such as documents, images, and videos
    • -
    • Lightning Publisher for WordPress: A patronage model for unlocking WordPress blog entries
    • -
    • Paypercall: A programmer’s toolkit for Lightning that enables micropayments for individual API calls
    • -
    • Ifpaytt: An extension of paypercall that allows web developers using IFTTT to request payments for service usage
    • -
    • Lightning Jukebox: A fun demo that reimagines a classic technology for the Lightning Network
    • -
    • Nanotip: The simple tip jar, rebuilt to issue Lightning Network invoices
    • +
    • WooCommerce Lightning Gateway: A comprehensive e-commerce application that integrates with stock-management and order-tracking systems
    • +
    • Nanopos: A simple point-of-sale system for fixed-price goods
    • +
    • FileBazaar: A system for selling files such as documents, images, and videos
    • +
    • Lightning Publisher for WordPress: A patronage model for unlocking WordPress blog entries
    • +
    • Paypercall: A programmer’s toolkit for Lightning that enables micropayments for individual API calls
    • +
    • Ifpaytt: An extension of paypercall that allows web developers using IFTTT to request payments for service usage
    • +
    • Lightning Jukebox: A fun demo that reimagines a classic technology for the Lightning Network
    • +
    • Nanotip: The simple tip jar, rebuilt to issue Lightning Network invoices
    diff --git a/BTCPayServer/Views/Server/LightningWalletServices.cshtml b/BTCPayServer/Views/Server/LightningWalletServices.cshtml index 41e23843a..8b7398bf4 100644 --- a/BTCPayServer/Views/Server/LightningWalletServices.cshtml +++ b/BTCPayServer/Views/Server/LightningWalletServices.cshtml @@ -27,7 +27,7 @@
    Browser connection

    - You can go to @Model.WalletName from your browser by clicking here
    + You can go to @Model.WalletName from your browser by clicking here

    diff --git a/BTCPayServer/Views/Server/LndSeedBackup.cshtml b/BTCPayServer/Views/Server/LndSeedBackup.cshtml index c89d132f5..7b4fa5738 100644 --- a/BTCPayServer/Views/Server/LndSeedBackup.cshtml +++ b/BTCPayServer/Views/Server/LndSeedBackup.cshtml @@ -11,7 +11,7 @@

    The LND seed backup is useful to recover funds of your LND wallet in case of a corruption of your server.

    -

    The recovering process is documented by LND on this page.

    +

    The recovering process is documented by LND on this page.

    See confidential seed information
    diff --git a/BTCPayServer/Views/Server/LndServices.cshtml b/BTCPayServer/Views/Server/LndServices.cshtml index 05b2bb3d1..8e9e682f0 100644 --- a/BTCPayServer/Views/Server/LndServices.cshtml +++ b/BTCPayServer/Views/Server/LndServices.cshtml @@ -15,22 +15,22 @@
    @if (Model.Uri == null) // if GRPC { - + Pebble
    Pebble
    - + Zap
    Zap
    } else { - + Joule
    Joule
    - + Zeus
    Zeus
    @@ -64,7 +64,7 @@

    - Click here to open the configuration file. + Click here to open the configuration file.

    } diff --git a/BTCPayServer/Views/Server/Maintenance.cshtml b/BTCPayServer/Views/Server/Maintenance.cshtml index 25fa9341b..653f057c3 100644 --- a/BTCPayServer/Views/Server/Maintenance.cshtml +++ b/BTCPayServer/Views/Server/Maintenance.cshtml @@ -9,7 +9,7 @@

    Domain name

    -

    You can change the domain name of your server by following this guide.

    +

    You can change the domain name of your server by following this guide.

    diff --git a/BTCPayServer/Views/Server/P2PService.cshtml b/BTCPayServer/Views/Server/P2PService.cshtml index 9acc4bb28..b56f54a7f 100644 --- a/BTCPayServer/Views/Server/P2PService.cshtml +++ b/BTCPayServer/Views/Server/P2PService.cshtml @@ -30,11 +30,11 @@

    Compatible wallets

    - + Blockstream Green
    Blockstream Green
    - + Wasabi Wallet
    Wasabi Wallet
    diff --git a/BTCPayServer/Views/Server/Policies.cshtml b/BTCPayServer/Views/Server/Policies.cshtml index e08d18fe3..66009103c 100644 --- a/BTCPayServer/Views/Server/Policies.cshtml +++ b/BTCPayServer/Views/Server/Policies.cshtml @@ -19,7 +19,7 @@
    - + @@ -27,7 +27,7 @@
    - + @@ -50,7 +50,7 @@ } - + @@ -79,7 +79,7 @@
    - + @@ -87,7 +87,7 @@
    - + @@ -107,7 +107,7 @@
    - + @@ -191,7 +191,7 @@
    - + diff --git a/BTCPayServer/Views/Server/RPCService.cshtml b/BTCPayServer/Views/Server/RPCService.cshtml index d4d88b46c..c36fb7f88 100644 --- a/BTCPayServer/Views/Server/RPCService.cshtml +++ b/BTCPayServer/Views/Server/RPCService.cshtml @@ -30,11 +30,11 @@

    Compatible wallets

    - + Fully Noded
    Fully Noded
    - + Specter Desktop
    Specter Desktop
    diff --git a/BTCPayServer/Views/Server/Services.cshtml b/BTCPayServer/Views/Server/Services.cshtml index 53adcb36b..0e660e90d 100644 --- a/BTCPayServer/Views/Server/Services.cshtml +++ b/BTCPayServer/Views/Server/Services.cshtml @@ -64,7 +64,7 @@
    @s.Name - See information + See information
    @s.Name - See information + See information
    @s.Name - Edit + Edit
    @payment.CryptoPaymentData.GetValue() @Safe.Raw(payment.AdditionalInformation is string i ? $"
    ({i})" : string.Empty)
    diff --git a/BTCPayServer/Views/Shared/Confirm.cshtml b/BTCPayServer/Views/Shared/Confirm.cshtml index 5d0cf2d3c..437e12348 100644 --- a/BTCPayServer/Views/Shared/Confirm.cshtml +++ b/BTCPayServer/Views/Shared/Confirm.cshtml @@ -30,7 +30,7 @@ @if (!string.IsNullOrEmpty(Model.Action)) { - + diff --git a/BTCPayServer/Views/Shared/Ethereum/UpdateChainConfig.cshtml b/BTCPayServer/Views/Shared/Ethereum/UpdateChainConfig.cshtml index abfa4081f..7e9001043 100644 --- a/BTCPayServer/Views/Shared/Ethereum/UpdateChainConfig.cshtml +++ b/BTCPayServer/Views/Shared/Ethereum/UpdateChainConfig.cshtml @@ -26,9 +26,9 @@
    Possible free options are
      -
    • linkpool.io - Free, just set the url to https://main-rpc.linkpool.io
    • -
    • chainstack.com - Free plan, choose shared public node
    • -
    • infura.io - Free tier but limited calls per day
    • +
    • linkpool.io - Free, just set the url to https://main-rpc.linkpool.io
    • +
    • chainstack.com - Free plan, choose shared public node
    • +
    • infura.io - Free tier but limited calls per day
    • Your own geth/openethereum node
    diff --git a/BTCPayServer/Views/Shared/Ethereum/ViewEthereumLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Ethereum/ViewEthereumLikePaymentData.cshtml index 81044dff5..79ef56aec 100644 --- a/BTCPayServer/Views/Shared/Ethereum/ViewEthereumLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Ethereum/ViewEthereumLikePaymentData.cshtml @@ -47,7 +47,7 @@
    @payment.Amount
    - + @payment.DepositAddress diff --git a/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml b/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml index 8f393726d..b9e423a1c 100644 --- a/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml +++ b/BTCPayServer/Views/Shared/LayoutPartials/SyncModal.cshtml @@ -19,9 +19,9 @@ }

    - Watch this video to understand the importance of blockchain synchronization. + Watch this video to understand the importance of blockchain synchronization.

    -

    If you really don't want to synch and you are familiar with the command line, check FastSync.

    +

    If you really don't want to synch and you are familiar with the command line, check FastSync.

    diff --git a/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckoutNoScript.cshtml b/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckoutNoScript.cshtml index 1492adf31..fd70cc2c1 100644 --- a/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckoutNoScript.cshtml +++ b/BTCPayServer/Views/Shared/Lightning/LightningLikeMethodCheckoutNoScript.cshtml @@ -3,7 +3,7 @@

    To complete payment, please send @Model.BtcDue @Model.CryptoCode to @Model.BtcAddress

    Time remaining: @Model.TimeLeft

    - @Model.InvoiceBitcoinUrl + @Model.InvoiceBitcoinUrl

    Peer Info: @Model.PeerInfo

    diff --git a/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml b/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml index b5561cf31..91703a639 100644 --- a/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml +++ b/BTCPayServer/Views/Shared/Monero/ViewMoneroLikePaymentData.cshtml @@ -53,7 +53,7 @@
    @payment.Amount diff --git a/BTCPayServer/Views/Shared/PostRedirect.cshtml b/BTCPayServer/Views/Shared/PostRedirect.cshtml index 445608bcc..00dfdfa58 100644 --- a/BTCPayServer/Views/Shared/PostRedirect.cshtml +++ b/BTCPayServer/Views/Shared/PostRedirect.cshtml @@ -17,7 +17,7 @@ Post Redirect -
    + @Html.AntiForgeryToken() @foreach (var o in Model.Parameters) { diff --git a/BTCPayServer/Views/Shared/Shopify/StoreIntegrationShopifyOption.cshtml b/BTCPayServer/Views/Shared/Shopify/StoreIntegrationShopifyOption.cshtml index 88a2e86c9..66c11e79e 100644 --- a/BTCPayServer/Views/Shared/Shopify/StoreIntegrationShopifyOption.cshtml +++ b/BTCPayServer/Views/Shared/Shopify/StoreIntegrationShopifyOption.cshtml @@ -10,7 +10,7 @@ Shopify - + diff --git a/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml b/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml index 18f903abc..8026124fe 100644 --- a/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml +++ b/BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml @@ -3,24 +3,24 @@

    - View all supporters + View all supporters

    diff --git a/BTCPayServer/Views/Shared/_Layout.cshtml b/BTCPayServer/Views/Shared/_Layout.cshtml index 7556902e4..db180c513 100644 --- a/BTCPayServer/Views/Shared/_Layout.cshtml +++ b/BTCPayServer/Views/Shared/_Layout.cshtml @@ -90,7 +90,7 @@ - BTCPay is expecting you to access this website from @(Env.ExpectedProtocol)://@(Env.ExpectedHost)/. If you use a reverse proxy, please set the X-Forwarded-Proto header to @(Env.ExpectedProtocol) (More information) + BTCPay is expecting you to access this website from @(Env.ExpectedProtocol)://@(Env.ExpectedHost)/. If you use a reverse proxy, please set the X-Forwarded-Proto header to @(Env.ExpectedProtocol) (More information) @if (!Env.IsSecure) { @@ -113,7 +113,7 @@ {
    -
    Logo made with 💚 by Ibuki
    +
    Logo made with 💚 by Ibuki
    @Env.ToString()
    diff --git a/BTCPayServer/Views/Shopify/EditShopifyIntegration.cshtml b/BTCPayServer/Views/Shopify/EditShopifyIntegration.cshtml index 0e52f99d2..d5e0ac1f0 100644 --- a/BTCPayServer/Views/Shopify/EditShopifyIntegration.cshtml +++ b/BTCPayServer/Views/Shopify/EditShopifyIntegration.cshtml @@ -15,7 +15,7 @@

    Shopify - + @@ -63,14 +63,14 @@

    - In Shopify please paste following script at Settings > Checkout > Order Processing > Additional Scripts + In Shopify please paste following script at Settings > Checkout > Order Processing > Additional Scripts

    @($"")

    - In Shopify please add a payment method at Settings > Payments > Manual Payment Methods with the name Bitcoin with BTCPay Server + In Shopify please add a payment method at Settings > Payments > Manual Payment Methods with the name Bitcoin with BTCPay Server

    diff --git a/BTCPayServer/Views/Stores/CheckoutExperience.cshtml b/BTCPayServer/Views/Stores/CheckoutExperience.cshtml index de30c378b..6ca5de6a5 100644 --- a/BTCPayServer/Views/Stores/CheckoutExperience.cshtml +++ b/BTCPayServer/Views/Stores/CheckoutExperience.cshtml @@ -93,7 +93,7 @@

    - + @@ -101,7 +101,7 @@
    - + diff --git a/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml b/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml index c91c9505d..b94077a6b 100644 --- a/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml +++ b/BTCPayServer/Views/Stores/ImportWallet/Xpub.cshtml @@ -15,7 +15,7 @@

    @ViewData["Title"]

    This key, also called "xpub", is used to generate individual destination addresses for your invoices. - +

    diff --git a/BTCPayServer/Views/Stores/Integrations.cshtml b/BTCPayServer/Views/Stores/Integrations.cshtml index 632d80c7a..842eb5f9f 100644 --- a/BTCPayServer/Views/Stores/Integrations.cshtml +++ b/BTCPayServer/Views/Stores/Integrations.cshtml @@ -18,10 +18,10 @@

    Other Integrations

    Take a look at documentation for the list of other integrations we support and the directions on how to enable them:

    diff --git a/BTCPayServer/Views/Stores/ListTokens.cshtml b/BTCPayServer/Views/Stores/ListTokens.cshtml index 466d4e683..2bad6c1d9 100644 --- a/BTCPayServer/Views/Stores/ListTokens.cshtml +++ b/BTCPayServer/Views/Stores/ListTokens.cshtml @@ -11,7 +11,7 @@ Warning: No wallet has been linked to your BTCPay Store.
    - See this link for more information on how to connect your store and wallet. + See this link for more information on how to connect your store and wallet. } @@ -26,7 +26,7 @@

    Authorize a public key to access Bitpay compatible Invoice API. - +

    diff --git a/BTCPayServer/Views/Stores/Rates.cshtml b/BTCPayServer/Views/Stores/Rates.cshtml index 6e4f2187b..b90cf23e1 100644 --- a/BTCPayServer/Views/Stores/Rates.cshtml +++ b/BTCPayServer/Views/Stores/Rates.cshtml @@ -18,7 +18,7 @@
    Scripting

    Rate script allows you to express precisely how you want to calculate rates for currency pairs.

    -

    We are retrieving the rate of each exchange either directly, or via CoinGecko (free).

    +

    We are retrieving the rate of each exchange either directly, or via CoinGecko (free).

    @@ -32,7 +32,7 @@
    @foreach (var exchange in Model.AvailableExchanges.Where(a => a.Source == BTCPayServer.Rating.RateSource.Direct)) { - @exchange.Id  + @exchange.Id  }
    @@ -48,7 +48,7 @@
    @foreach (var exchange in Model.AvailableExchanges.Where(a => a.Source == BTCPayServer.Rating.RateSource.Coingecko)) { - @exchange.Id  + @exchange.Id  }
    @@ -157,7 +157,7 @@

    - Current Rates source is @Model.PreferredExchange. + Current Rates source is @Model.PreferredExchange.

    diff --git a/BTCPayServer/Views/Stores/SetupLightningNode.cshtml b/BTCPayServer/Views/Stores/SetupLightningNode.cshtml index e132347ce..0f6f05651 100644 --- a/BTCPayServer/Views/Stores/SetupLightningNode.cshtml +++ b/BTCPayServer/Views/Stores/SetupLightningNode.cshtml @@ -11,7 +11,7 @@

    Please understand that the Lightning Network is still under active development and considered experimental. Before you proceed, take time to familiarize yourself with the risks. - More information + More information

    diff --git a/BTCPayServer/Views/Stores/UpdateStore.cshtml b/BTCPayServer/Views/Stores/UpdateStore.cshtml index a4b910d4d..b0568dc30 100644 --- a/BTCPayServer/Views/Stores/UpdateStore.cshtml +++ b/BTCPayServer/Views/Stores/UpdateStore.cshtml @@ -178,7 +178,7 @@ @@ -188,7 +188,7 @@ @@ -197,7 +197,7 @@ }
    - + diff --git a/BTCPayServer/Views/Stores/_GenerateWalletForm.cshtml b/BTCPayServer/Views/Stores/_GenerateWalletForm.cshtml index 1971d212c..2b2519274 100644 --- a/BTCPayServer/Views/Stores/_GenerateWalletForm.cshtml +++ b/BTCPayServer/Views/Stores/_GenerateWalletForm.cshtml @@ -14,8 +14,8 @@
    You are not an admin on this server. While you are able to import or generate a wallet via seed with your account, please understand that you are trusting the server admins not just with your - privacy - but also with trivial access to your funds. + privacy + but also with trivial access to your funds. If you NEED to use this feature, please reconsider hosting your own BTCPay Server instance.
    } @@ -65,7 +65,7 @@

    PayJoin enhances the privacy for you and your customers. Enabling it gives your customers the option to use PayJoin during checkout. - +

    diff --git a/BTCPayServer/Views/UserStores/ListStores.cshtml b/BTCPayServer/Views/UserStores/ListStores.cshtml index 5ed5b3a32..54c7720e1 100644 --- a/BTCPayServer/Views/UserStores/ListStores.cshtml +++ b/BTCPayServer/Views/UserStores/ListStores.cshtml @@ -67,7 +67,7 @@

    @if (!string.IsNullOrEmpty(store.WebSite)) { - @store.WebSite + @store.WebSite } diff --git a/BTCPayServer/Views/Wallets/ListWallets.cshtml b/BTCPayServer/Views/Wallets/ListWallets.cshtml index 1e7cc663c..f0c006e1a 100644 --- a/BTCPayServer/Views/Wallets/ListWallets.cshtml +++ b/BTCPayServer/Views/Wallets/ListWallets.cshtml @@ -12,7 +12,7 @@

    @ViewData["Title"] - + diff --git a/BTCPayServer/Views/Wallets/NewPullPayment.cshtml b/BTCPayServer/Views/Wallets/NewPullPayment.cshtml index 1acfa5b45..94c0aec3d 100644 --- a/BTCPayServer/Views/Wallets/NewPullPayment.cshtml +++ b/BTCPayServer/Views/Wallets/NewPullPayment.cshtml @@ -74,7 +74,7 @@
    - + diff --git a/BTCPayServer/Views/Wallets/Payouts.cshtml b/BTCPayServer/Views/Wallets/Payouts.cshtml index 6dcda7f68..4231faa50 100644 --- a/BTCPayServer/Views/Wallets/Payouts.cshtml +++ b/BTCPayServer/Views/Wallets/Payouts.cshtml @@ -117,7 +117,7 @@

    @if (!(pp.ProofLink is null)) { - Link + Link } - + @transaction.Id