feat(security): Implement Bcrypt for basic auth and deprecate SHA512

I've re-written the code for this several times before but always ended up not going through with it because a hashed Bcrypt string has dollar signs in it, which caused issues with the config due to environment variable support.
I finally decided to go through with it by forcing users to base64 encode the bcrypt hash
This commit is contained in:
TwiN committed 2022-01-08 19:59:45 -05:00
1 parent fc016bd682
commit c712133df0
11 files changed
+835 -14

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ import (
)
// Sha512 hashes a provided string using SHA512 and returns the resulting hash as a string
// Deprecated: Use bcrypt instead
func Sha512(s string) string {
hash := sha512.New()
hash.Write([]byte(s))