m = hmac.new(getTokenKey(), digestmod=sha)
m.update(pickled_data)
if (m.digest() == digest):
- data = cPickle.loads(token['data'])
+ data = cPickle.loads(pickled_data)
expires = data["expires"]
if (time.time() < expires):
self.auth = data["user"]
self.auth_data = data
else:
self.auth_error = "Token has expired; please try logging in again"
- except (TypeError, ValueError, cPickle.UnpickleError):
+ except (TypeError, ValueError, cPickle.UnpicklingError):
self.auth = None
print sys.exc_info()