Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication not validating password at all. #8

Open
Fa2y opened this issue Jan 25, 2023 · 1 comment
Open

Authentication not validating password at all. #8

Fa2y opened this issue Jan 25, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Fa2y
Copy link

Fa2y commented Jan 25, 2023

if user and verify_password(password, user.password):

authentication.py:70: RuntimeWarning: coroutine 'verify_password' was never awaited
  if user and verify_password(password, user.password):
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
INFO:     127.0.0.1:46472 - "POST /token HTTP/1.1" 200 OK

verify_password is an async function and should be awaited, not awaiting it will result in returning a coroutine object that render the condition pointless as it will give valid token for any true username provided.

@onionj
Copy link
Owner

onionj commented Jan 28, 2023

Oh, thank you, can you fix it and make a pull request?

@onionj onionj self-assigned this Jan 28, 2023
@onionj onionj added the bug Something isn't working label Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants