From 9eaa928b7fcee5b3fb404e9ab3ee8b815585ef7f Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Tue, 19 Nov 2013 10:13:12 -0500 Subject: [PATCH] StripeController: give 404 response to charge notice with no buyer. --- r2/r2/controllers/ipn.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/r2/r2/controllers/ipn.py b/r2/r2/controllers/ipn.py index 58f3488dd..dec79f5f3 100644 --- a/r2/r2/controllers/ipn.py +++ b/r2/r2/controllers/ipn.py @@ -820,6 +820,8 @@ class StripeController(GoldPaymentController): # db replication lag may cause the account lookup to fail if charge_date < timeago('1 hour'): raise ValueError('no buyer for charge: %s' % charge.id) + else: + self.abort404() webhook = Webhook(transaction_id=transaction_id, subscr_id=customer_id, pennies=pennies, months=months, goldtype='autorenew',