badge-service: say what hashing the Play order id protects

The hash is unkeyed, so a holder of the buyer's receipt can still find the row (R2-1). Run: 004-badge-subscriptions-review, review round 2
This commit is contained in:
spacedandy-agents-simplex committed 2026-10-15 10:13:25 +00:00
1 parent 498a3a51b5
commit b84d031bad
1 file changed
+1 -1
@@ -163,7 +163,7 @@ subscriptionVerdict SubscriptionPurchase {subscriptionStateName, testSubscriptio
latestCharge <- forM latestSuccessfulOrderId $ \orderId -> case (expiryTime, basePlanId) of
(Just periodEnd, Just planId) ->
let periodStart = maybe periodEnd (\(_, months) -> addMonths (negate $ toInteger months) periodEnd) (storePlan PPGoogle planId)
-- hashed: the order id is on the buyer's Play receipt email
-- hashed so the row does not show the order id; unkeyed, so a holder of the buyer's receipt can still find it
in Right StoreCharge {chargeRef = googlePurchaseRef orderId, planId, periodStart, periodEnd, chargePaid = Nothing, revoked = False, offer = inOffer}
_ -> Left $ SRVerifierFailed "Play answered a charge without its expiryTime or base plan"
pure SubscriptionCheck {subscriptionState, testSubscription, latestCharge}