Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Commit

Permalink
resolves #6
Browse files Browse the repository at this point in the history
  • Loading branch information
TomStary committed Apr 29, 2018
1 parent 5f74050 commit 274a9af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evodoc/api/userapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def activation_action():
user_id = data['user_id']
user = User.get_user_by_id(user_id)
token = check_token_exists(data['token'])
if token == None:
if token == None or token.user_id != user_id:
raise ApiException(403, "Invalid token")
if user.activated:
raise ApiException(401, "User has been already activated.")
Expand Down

0 comments on commit 274a9af

Please sign in to comment.