Skip to content

Fix the login password verification#568

Merged
wu-clan merged 2 commits into
fastapi-practices:masterfrom
wu-clan:fix-login-auth
Apr 7, 2025
Merged

Fix the login password verification#568
wu-clan merged 2 commits into
fastapi-practices:masterfrom
wu-clan:fix-login-auth

Conversation

@wu-clan

@wu-clan wu-clan commented Apr 7, 2025

Copy link
Copy Markdown
Member

No description provided.

@wu-clan
wu-clan requested a review from Copilot April 7, 2025 02:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

backend/app/admin/service/auth_service.py:48

  • Allowing a None password in the verification may hide unintended cases; consider separating the check for a missing password from the password_verify call to clarify intended behavior.
elif user.password is None or not password_verify(password, user.password):

backend/app/admin/api/v1/sys/token.py:65

  • Changing from a 'login_type' string to a boolean flag 'swagger' may introduce inconsistencies; ensure that all Swagger login tokens consistently set this flag and that downstream logic reflects the new type.
if extra_info.get('swagger') is None:

@wu-clan
wu-clan merged commit 644f7a0 into fastapi-practices:master Apr 7, 2025
@wu-clan
wu-clan deleted the fix-login-auth branch April 7, 2025 03:04
chuxijin pushed a commit to chuxijin/fba that referenced this pull request Feb 8, 2026
* Fix the login password verification

* Update the check criteria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants