-
Notifications
You must be signed in to change notification settings - Fork 80
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
Remove in query user api the unencrypted password exposed #232
Comments
I would suggest preventing this by not reading the password from the database as suggested here: https://stackoverflow.com/a/62957519/2202290 However I also noticed that the password is encrypted (rather than hashed). This is not considered best practise because the administrators / developers / ... could steal the password of the users by decrypting the password. Background Information: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#background |
Hi @glutengo, thanks for the suggestion! |
I think it would be good to split it into two issues: The second issue would be about password encryption / hashing. As stated above, I think it would be better if the password was hashed so that there is no way to decrypt the password. |
Ok, it's ok the first PR, you can open a new issue for the second point. |
Maybe you should consider following some practices from JHipster java:
|
@gmarziou I agree, the bcrypt library is the standard for storing passwords in Node.js web apps too. I have created issue #234 for that. |
Do not read user password from DB closes #232
Describe the bug
At numerous places in the application, the value of the password property of the user entity are delivered in plain text. This affects (incomplete):
The password should not be readable to anyone, not even the admin. The password should be at least encrypted, but it would be better if it was not included in the serialized user object at all.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The password is not part of the serialized user object.
Screenshots
Desktop (please complete the following information):
NHipster configuration
Additional context
I discovered the problem while working on #214
The text was updated successfully, but these errors were encountered: