From 86ca065ab345f0cd1522d32914cd75269f709167 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 6 Sep 2015 13:22:35 -0400 Subject: [PATCH] Fix bug with password reset during donation --- fosspay/blueprints/html.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fosspay/blueprints/html.py b/fosspay/blueprints/html.py index 329bd9d..7b128bf 100644 --- a/fosspay/blueprints/html.py +++ b/fosspay/blueprints/html.py @@ -123,11 +123,9 @@ def donate(): if not user: new_account = True user = User(email, binascii.b2a_hex(os.urandom(20)).decode("utf-8")) - user.passwordReset = binascii.b2a_hex(os.urandom(20)).decode("utf-8") - user.passwordResetExpiry = datetime.now() + timedelta(days=1) - print(stripe_token) + user.password_reset = binascii.b2a_hex(os.urandom(20)).decode("utf-8") + user.password_reset_expires = datetime.now() + timedelta(days=1) customer = stripe.Customer.create(email=user.email, card=stripe_token) - print(customer) user.stripe_customer = customer.id db.add(user)