diff --git a/backend/app/store/user.go b/backend/app/store/user.go index 9d8b28ad..5e5da334 100644 --- a/backend/app/store/user.go +++ b/backend/app/store/user.go @@ -48,9 +48,8 @@ func EncodeID(id string) string { // hashWithFallback tries to has val with hash.Hash and fallback to crc if needed func hashWithFallback(h hash.Hash, val string) string { - - if reValidSha.MatchString(val) { - return val // already hashed or empty + if len(val) == 0 || reValidSha.MatchString(val) { + return val // empty or already hashed } if _, err := io.WriteString(h, val); err != nil {