Skip to content

Commit

Permalink
Fix account verification before login password
Browse files Browse the repository at this point in the history
  • Loading branch information
eristich committed Oct 15, 2021
1 parent 135ba04 commit ba327d3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions routes/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ def on_post(self, req, resp):
resp.media = {'title': 'BAD_REQUEST', 'description': 'Your account has been banned'}
return

if verification_date is None or verification_date > datetime.datetime.utcnow():
resp.status = falcon.HTTP_ALREADY_REPORTED
resp.media = {'title': 'BAD_REQUEST', 'description': 'Please verify your account'}
return

if self.password_hasher.verify_password(password, req.media['password']):

if verification_date is None or verification_date > datetime.datetime.utcnow():
resp.status = falcon.HTTP_ALREADY_REPORTED
resp.media = {'title': 'BAD_REQUEST', 'description': 'Please verify your account'}
return

if subscription_exp > datetime.datetime.utcnow():
roles.append('premium')

Expand Down

0 comments on commit ba327d3

Please sign in to comment.