Conversation
hf
left a comment
There was a problem hiding this comment.
Hey generally looks good, but I'd suggest using crypto/sha256 instead of crypto/md. It's quite old, and not particularly secure for this use case. It's only acceptable for computing message digests and not as a one-way function.
|
Actually for even more security you could use |
|
One other remark, and this is really a nit, is to use |
decided not to use the |
Usually you can just do something like: hex.EncodeToString(array[:])To convert the array to a slice... No need to block the PR on this though, if you want you can change it in another PR -- do it, if not, c'est la vie. 😸 |
There was a problem hiding this comment.
Actually. This seems to not be working very well: https://go.dev/play/p/yKmLeyU2vmi
LOL. No this uses |
|
🎉 This PR is included in version 2.7.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
* fix: add migrations to hash email * add email otp length to config * remove email hash migration * send email hash & otp in email link * verify post should check for token hash * fix verify tests * fix tests * update generate_link endpoint * remove magic number * use sum224 instead of md5
What kind of change does this PR introduce?
xxx_tokenin the db is now hash(email + otp) instead of just the otpxxxxx-xxxxx-xxxxx-xxxxx)To-Dos