-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Bug Report
Current Behavior
Currently, the userId is the email address of the user. This opens up possible PII leaks. The issue is to hash the email address and password before storing it in the DB.
Input Code
In the putMethod, the email address stored in the DB is the same one that's sent from the request.
It's expected that the email is hashed before storing it in the DB.
Expected behavior/code
Before the email enters the putMethod, it's expected that the email is hashed to avoid PII.
Choose a suitable hashing algorithm ( preferably with a suitable salt ). Do not forget to randomize the salt.
Additional context/Screenshots
- Do not forget to unhash the email to compare with the email in token
- Attempted to use
bcrypt
to hash - Didn't work as I got the error given here
- Helpful links
- Make a function since we'd be hashing the password as well.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request