maybe I shouldn't just have copied and pasted this code from the corresponding sanity check in chocolate.py

This commit is contained in:
Seth Schoen 2012-11-17 00:44:43 -08:00
parent e3c819178f
commit 9c30f984b9

View file

@ -47,7 +47,7 @@ class payment(object):
web.header("Content-type", "text/html")
if len(session) != 64 or not all(hexdigit(s) for s in session):
return "Attempt to process payment for invalid session."
if session not in r or r.hget(self.id, "live") != "True":
if session not in r or r.hget(session, "live") != "True":
return "Attempt to process payment for invalid session."
if r.hget(session, "state") != "payment":
return "Attempt to process payment for session not expecting it."