Remove deprecated model.ComparePassword method (#18069)

Этот коммит содержится в:
Ben Schumacher
2021-08-06 11:52:01 +02:00
коммит произвёл GitHub
родитель 4bc8eae04f
Коммит 28137b3048
2 изменённых файлов: 0 добавлений и 19 удалений

Просмотреть файл

@@ -854,18 +854,6 @@ func HashPassword(password string) string {
return string(hash)
}
// ComparePassword compares the hash
// This function is deprecated and will be removed in a future release.
func ComparePassword(hash string, password string) bool {
if password == "" || hash == "" {
return false
}
err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
return err == nil
}
var validUsernameChars = regexp.MustCompile(`^[a-z0-9\.\-_]+$`)
var validUsernameCharsForRemote = regexp.MustCompile(`^[a-z0-9\.\-_:]+$`)