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

Fixed password was not hashed on REST API update #14340

Conversation

fanshan
Copy link
Contributor

@fanshan fanshan commented Nov 23, 2023

  • When we updated a user password with a REST API call the password was stored in clear in plain text in the database.

Fixes: #14339

  • Add an update method on the UserSerializer that set properly the new password if provided by the API call.

* When we updated a user password with a REST API call the password was
  stored in clear in plain text in the database.
@abhi1693 abhi1693 closed this Nov 25, 2023
@abhi1693 abhi1693 reopened this Nov 25, 2023
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

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

Thanks @fanshan!

netbox/users/api/serializers.py Outdated Show resolved Hide resolved
netbox/users/tests/test_api.py Show resolved Hide resolved
netbox/users/tests/test_api.py Outdated Show resolved Hide resolved
* Move test on UserTest class
* Call `super().update()` in overriding `update` method
@fanshan
Copy link
Contributor Author

fanshan commented Nov 28, 2023

Thanks @fanshan!

Thanks @jeremystretch for your review ;-)

@jeremystretch jeremystretch merged commit 3a3d439 into netbox-community:develop Nov 29, 2023
4 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User password update via REST API is not hashed
3 participants