mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-11 13:57:42 +00:00
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:
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}
|
||||
|
||||
Reference in new issue
Block a user