What changed, and why it matters
This is a tiny code cleanup in a background migration service. It removes an unnecessary check (`i.Title != null`) from a database query that selects old-style payment requests needing migration. There is no visible security relevance: the change does not alter access controls, validation, or data handling in a way that would create or fix a vulnerability.
No security action required. Review as normal code-quality/migration-correctness change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies PaymentRequestsMigratorHostedService.cs, narrowing the WHERE predicate used to find legacy PaymentRequest rows for migration. Previously the migrator excluded rows where Blob was empty, Blob2 existed, and both Currency and Title were non-null. The patch drops the Title != null requirement, treating the remaining conditions as sufficient to identify already-migrated records. This is a functional simplification/correction of a migration filter, not a security boundary change.
Changed components
BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.csInspect captured patch +2 / −2
diff --git a/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs b/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
index 7c3d96b..bdc74b7 100644
--- a/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
+++ b/BTCPayServer/HostedServices/PaymentRequestsMigratorHostedService.cs
@@ -32,8 +32,8 @@ namespace BTCPayServer.HostedServices
{
#pragma warning disable CS0618 // Type or member is obsolete
var query = progress is DateTimeOffset last2 ?
- ctx.PaymentRequests.Where(i => i.Created < last2 && !((i.Blob == null || i.Blob.Length == 0) && i.Blob2 != null && i.Currency != null && i.Title != null)) :
- ctx.PaymentRequests.Where(i => !((i.Blob == null || i.Blob.Length == 0) && i.Blob2 != null && i.Currency != null && i.Title != null));
+ ctx.PaymentRequests.Where(i => i.Created < last2 && !((i.Blob == null || i.Blob.Length == 0) && i.Blob2 != null && i.Currency != null)) :
+ ctx.PaymentRequests.Where(i => !((i.Blob == null || i.Blob.Length == 0) && i.Blob2 != null && i.Currency != null));
return query.OrderByDescending(i => i.Created);
#pragma warning restore CS0618 // Type or member is obsolete
}
Why this scored 11/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.