-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Labels
user registryAn issue for the endpoints related to the User RegistryAn issue for the endpoints related to the User Registry
Description
cve-services/src/controller/org.controller/org.controller.js
Lines 816 to 818 in 54aa5ab
| const secret = await argon2.hash(randomKey) | |
| newUser.secret = secret | |
| newRegistryUser.secret = secret |
versus
cve-services/src/controller/org.controller/org.controller.js
Lines 1349 to 1351 in 54aa5ab
| randomKey = cryptoRandomString({ length: getConstants().CRYPTO_RANDOM_STRING_LENGTH }) | |
| oldUser.secret = await argon2.hash(randomKey) // store in db | |
| oldUserRegistry.secret = await argon2.hash(randomKey) // store in db |
It seems that you would want
secret in the two documents (in two different collections) to always be the same, or always be different . It doesn't seem that it would be valuable to make them different (because the two calls to argon2.hash(randomKey) will produce different output for the same randomKey) only if resetSecret happens to be called.@david-rocca
Metadata
Metadata
Assignees
Labels
user registryAn issue for the endpoints related to the User RegistryAn issue for the endpoints related to the User Registry
Type
Projects
Status
Done