What changed, and why it matters
This commit simply re-adds a helper method called GetAppData that retrieves application data from a web request. It throws an error if the data is missing. There is no indication of a security fix or vulnerability in this change.
No security action required. Review as normal code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds a single extension method GetAppData(this HttpContext ctx) that delegates to GetAppDataOrNull and throws InvalidOperationException if no AppData is present in HttpContext.Items. It is a two-line convenience wrapper around existing functionality. No access control, validation, or data handling logic is changed.
Changed components
BTCPayServer/Extensions.csInspect captured patch +2 / −0
diff --git a/BTCPayServer/Extensions.cs b/BTCPayServer/Extensions.cs
index 4bfb106..4261a45 100644
--- a/BTCPayServer/Extensions.cs
+++ b/BTCPayServer/Extensions.cs
@@ -837,6 +837,8 @@ namespace BTCPayServer
public static void SetPullPaymentData(this HttpContext ctx, PullPaymentData? pullPaymentData)
=> ctx.Items["BTCPAY.PULLPAYMENTDATA"] = pullPaymentData;
+ public static AppData? GetAppData(this HttpContext ctx)
+ => GetAppDataOrNull(ctx) ?? throw new InvalidOperationException("AppData is not set");
public static AppData? GetAppDataOrNull(this HttpContext ctx)
=> ctx.Items.TryGet("BTCPAY.APPDATA") as AppData;
Why 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.