What changed, and why it matters
This commit is a simple rename of a code attribute from UseStoreLanguageAttribute to StorefrontRouteAttribute. It only changes the name used in source files and does not alter any program behavior, security settings, or access controls.
No security action needed. Treat as a routine refactoring commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit renames the custom ASP.NET MVC action filter attribute UseStoreLanguageAttribute to StorefrontRouteAttribute and updates all references across 11 files. The attribute still resolves to the same TypeFilterAttribute(typeof(StoreLanguageFilter)), so the filter logic, route resolution, and language handling are unchanged. There are no functional code changes beyond the rename and a minor whitespace fix in a test file.
Changed components
BTCPayServer.Plugins.Translations.StorefrontRouteAttribute (formerly UseStoreLanguageAttribute)Controllers and plugins that decorate public/storefront routes with the renamed attributeInspect captured patch +24 / −24
### BTCPayServer.Tests/LanguageServiceTests.cs
@@ -721,7 +721,7 @@ await Task.Run(() =>
TestLogs.LogInformation("Editing a parent language drops cached children");
await db.ExecuteAsync("INSERT INTO lang_dictionaries VALUES ('Quebecois', 'French', 'Custom')");
var quebec = await localizer.GetUserTranslations("Quebecois");
- Assert.Equal("Bonjour", quebec!.Translations["Hello"]);
+ Assert.Equal("Bonjour", quebec!.Translations["Hello"]);
await SetHello("Allo");
var quebecAgain = await localizer.GetUserTranslations("Quebecois");
Assert.NotSame(quebec, quebecAgain);
@@ -1038,7 +1038,7 @@ public async Task CanUseStoreLanguageOnPublicAppPages()
var client = await user.CreateClient();
var app = await client.CreatePointOfSaleApp(user.StoreId, new PointOfSaleAppRequest { AppName = "Lang test" });
- var filter = (IAsyncActionFilter)new UseStoreLanguageAttribute().CreateInstance(tester.PayTester.ServiceProvider);
+ var filter = (IAsyncActionFilter)new StorefrontRouteAttribute().CreateInstance(tester.PayTester.ServiceProvider);
async Task<string> RenderPage(bool withAttribute)
{
return await Task.Run(async () =>
### BTCPayServer/Controllers/UIInvoiceController.UI.cs
@@ -197,7 +197,7 @@ public async Task<IActionResult> Invoice(string invoiceId)
}
[XFrameOptions(null)]
- [UseStoreLanguage]
+ [StorefrontRoute]
[HttpGet("i/{invoiceId}/receipt")]
public async Task<IActionResult> InvoiceReceipt(string invoiceId, [FromQuery] bool print = false)
{
@@ -770,7 +770,7 @@ public IActionResult LegacyCheckout(string? invoiceId, string? id = null, string
[AcceptMediaTypeConstraint("application/bitcoin-paymentrequest", false)]
[XFrameOptions(null)]
[ReferrerPolicy("origin")]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> Checkout(string invoiceId, string? paymentMethodId = null,
[FromQuery] string? view = null)
{
### BTCPayServer/Controllers/UIPaymentRequestController.cs
@@ -330,7 +330,7 @@ await _storeLabelRepository.SetStoreObjectLabels(
[HttpGet("{payReqId}")]
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ViewPaymentRequest(string payReqId)
{
var vm = await _PaymentRequestService.GetPaymentRequest(payReqId, GetUserId());
@@ -357,7 +357,7 @@ public async Task<IActionResult> ViewPaymentRequest(string payReqId)
[HttpGet("{payReqId}/form")]
[HttpPost("{payReqId}/form")]
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
public async Task<IActionResult> ViewPaymentRequestForm(string payReqId, FormViewModel viewModel)
{
@@ -418,7 +418,7 @@ public async Task<IActionResult> ViewPaymentRequestForm(string payReqId, FormVie
[HttpGet("{payReqId}/pay")]
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> PayPaymentRequest(string payReqId, bool redirectToInvoice = true,
decimal? amount = null, CancellationToken cancellationToken = default)
{
@@ -508,7 +508,7 @@ public async Task<IActionResult> PayPaymentRequest(string payReqId, bool redirec
[HttpGet("{payReqId}/cancel")]
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> CancelUnpaidPendingInvoice(string payReqId, bool redirect = true)
{
var result = await _PaymentRequestService.GetPaymentRequest(payReqId, GetUserId());
### BTCPayServer/Controllers/UIPublicLightningNodeInfoController.cs
@@ -29,7 +29,7 @@ public class UIPublicLightningNodeInfoController(
{
[HttpGet]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ShowLightningNodeInfo(string storeId, string cryptoCode, bool showLocal = false)
{
showLocal &= env.CheatMode;
### BTCPayServer/Controllers/UIPullPaymentController.cs
@@ -41,7 +41,7 @@ public class UIPullPaymentController(
public IStringLocalizer StringLocalizer { get; } = stringLocalizer;
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
[HttpGet("pull-payments/{pullPaymentId}")]
public async Task<IActionResult> ViewPullPayment(string pullPaymentId)
{
@@ -169,7 +169,7 @@ public async Task<IActionResult> EditPullPayment(string storeId, string pullPaym
}
[AllowAnonymous]
- [UseStoreLanguage]
+ [StorefrontRoute]
[HttpPost("pull-payments/{pullPaymentId}")]
public async Task<IActionResult> ClaimPullPayment(string pullPaymentId, ViewPullPaymentModel vm, CancellationToken cancellationToken)
{
### BTCPayServer/Plugins/Crowdfund/Controllers/UICrowdfundController.cs
@@ -62,7 +62,7 @@ public class UICrowdfundController(
[HttpGet("/apps/{appId}/crowdfund")]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
[DomainMappingConstraint(CrowdfundAppType.AppType)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ViewCrowdfund(string appId)
{
var app = await appService.GetApp(appId, CrowdfundAppType.AppType, true);
@@ -97,7 +97,7 @@ public async Task<IActionResult> ViewCrowdfund(string appId)
[IgnoreAntiforgeryToken]
[EnableCors(CorsPolicies.All)]
[DomainMappingConstraint(CrowdfundAppType.AppType)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ContributeToCrowdfund(string appId, ContributeToCrowdfund request, string formResponse = null, CancellationToken cancellationToken = default)
{
// Throttled here rather than with a filter, as AppHub.CreateInvoice and CrowdfundFormSubmit call this action directly
@@ -278,7 +278,7 @@ private JObject TryParseJObject(string posData)
[HttpGet("/apps/{appId}/crowdfund/form")]
[IgnoreAntiforgeryToken]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> CrowdfundForm(string appId, decimal? amount=0, string choiceKey="")
{
var app = await appService.GetApp(appId, CrowdfundAppType.AppType);
@@ -318,7 +318,7 @@ public async Task<IActionResult> CrowdfundForm(string appId, decimal? amount=0,
[HttpPost("/apps/{appId}/crowdfund/form/submit")]
[IgnoreAntiforgeryToken]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> CrowdfundFormSubmit(string appId, decimal amount, string choiceKey, FormViewModel viewModel)
{
var app = await appService.GetApp(appId, CrowdfundAppType.AppType);
### BTCPayServer/Plugins/Forms/UIFormsController.cs
@@ -141,7 +141,7 @@ public async Task<IActionResult> Remove(string formId)
[AllowAnonymous]
[HttpGet("~/forms/{formId}")]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ViewPublicForm(string? formId)
{
FormData? formData = await formDataService.GetForm(formId);
@@ -179,7 +179,7 @@ async Task<ViewResult> GetFormView(FormData formData, Form? form = null)
[HttpPost("~/forms/{formId}")]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
[RateLimitsFilter(ZoneLimits.PublicInvoices, Scope = RateLimitsScope.RemoteAddress)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> SubmitForm(string formId)
{
var formData = await formDataService.GetForm(formId);
### BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
@@ -96,7 +96,7 @@ public UIPointOfSaleController(
[HttpGet("/apps/{appId}/pos/{viewType?}")]
[DomainMappingConstraint(PointOfSaleAppType.AppType)]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ViewPointOfSale(string appId, PosViewType? viewType = null)
{
var app = await _appService.GetApp(appId, PointOfSaleAppType.AppType);
@@ -205,7 +205,7 @@ private string GetItemPriceFormatted(AppItem item, string currency)
[EnableCors(CorsPolicies.All)]
[DomainMappingConstraint(PointOfSaleAppType.AppType)]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> ViewPointOfSale(string appId,
PosViewType? viewType = null,
[ModelBinder(typeof(InvariantDecimalModelBinder))] decimal? amount = null,
@@ -496,7 +496,7 @@ private JObject TryParseJObject(string posData)
[HttpPost("/apps/{appId}/pos/form/{viewType?}")]
[IgnoreAntiforgeryToken]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> POSForm(string appId, PosViewType? viewType = null)
{
var app = await _appService.GetApp(appId, PointOfSaleAppType.AppType);
@@ -542,7 +542,7 @@ public async Task<IActionResult> POSForm(string appId, PosViewType? viewType = n
[HttpPost("/apps/{appId}/pos/form/submit/{viewType?}")]
[IgnoreAntiforgeryToken]
[XFrameOptions(XFrameOptionsAttribute.XFrameOptions.Unset)]
- [UseStoreLanguage]
+ [StorefrontRoute]
public async Task<IActionResult> POSFormSubmit(string appId, FormViewModel viewModel, PosViewType? viewType = null)
{
var app = await _appService.GetApp(appId, PointOfSaleAppType.AppType);
### BTCPayServer/Plugins/Subscriptions/Controllers/UIPlanCheckoutController.cs
@@ -19,7 +19,7 @@ namespace BTCPayServer.Plugins.Subscriptions.Controllers;
[AllowAnonymous]
-[UseStoreLanguage]
+[StorefrontRoute]
[Area(SubscriptionsPlugin.Area)]
[Route("plan-checkout/{planCheckoutId}")]
public class UIPlanCheckoutController(
### BTCPayServer/Plugins/Subscriptions/Controllers/UISubscriberPortalController.cs
@@ -24,7 +24,7 @@
namespace BTCPayServer.Plugins.Subscriptions.Controllers;
[AllowAnonymous]
-[UseStoreLanguage]
+[StorefrontRoute]
[Area(SubscriptionsPlugin.Area)]
[Route("subscriber-portal/{portalSessionId}")]
public class UISubscriberPortalController(
### BTCPayServer/Plugins/Translations/StorefrontRouteAttribute.cs
@@ -9,7 +9,7 @@
namespace BTCPayServer.Plugins.Translations;
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
-public class UseStoreLanguageAttribute() : TypeFilterAttribute(typeof(StoreLanguageFilter));
+public class StorefrontRouteAttribute() : TypeFilterAttribute(typeof(StoreLanguageFilter));
internal class StoreLanguageFilter(TranslationsAccessor translationsAccessor, StoreRepository storeRepository,
RouteStoreResolver routeStoreResolver) : IAsyncActionFilterWhy this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.