mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
be sure that project_id was not modified by verify_token
This commit is contained in:
parent
0ff0b03945
commit
0a33007adf
1 changed files with 5 additions and 2 deletions
|
@ -206,10 +206,13 @@ def authenticate(project_id=None):
|
|||
# Try to get project_id from token first
|
||||
token = request.args.get("token")
|
||||
if token:
|
||||
project_id = Project.verify_token(
|
||||
verified_project_id = Project.verify_token(
|
||||
token, token_type="auth", project_id=project_id
|
||||
)
|
||||
if verified_project_id == project_id:
|
||||
token_auth = True
|
||||
else:
|
||||
project_id = None
|
||||
else:
|
||||
token_auth = False
|
||||
if project_id is None:
|
||||
|
|
Loading…
Reference in a new issue