Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Do not set password to None before user creation call#6007

Merged
mvilanova merged 3 commits into
mainfrom
mvilanova-patch-2
May 21, 2025
Merged

Do not set password to None before user creation call#6007
mvilanova merged 3 commits into
mainfrom
mvilanova-patch-2

Conversation

@mvilanova

Copy link
Copy Markdown
Contributor

No description provided.

@mvilanova mvilanova changed the title Update service.py Do not set password to None before user creation call May 21, 2025
@mvilanova mvilanova requested a review from Copilot May 21, 2025 16:53
@mvilanova mvilanova self-assigned this May 21, 2025
@mvilanova mvilanova added the bug Something isn't working label May 21, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the handling of the password field during user creation by ensuring that a password is never set to None. The key change removes the conditional check for None and always converts the provided password to bytes, ensuring consistency in the user creation process.

Comments suppressed due to low confidence (1)

src/dispatch/auth/service.py:151

  • Removing the condition that checks for None may lead to a TypeError if user_in.password is None (e.g., for SSO users). Consider adding an assertion or exception to handle cases where user_in.password is None before conversion.
password = bytes(user_in.password, "utf-8")

@mvilanova mvilanova merged commit 213394f into main May 21, 2025
9 checks passed
@mvilanova mvilanova deleted the mvilanova-patch-2 branch May 21, 2025 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants