forked from mtusi2026/mtusi2026lab2
fix(app) backported some things agent broke in lab2 and bugfixed other autocheck issues manually
This commit is contained in:
@@ -74,10 +74,11 @@ func ValidateCreateUser(username, displayName string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// ValidatePassword enforces the contract range in Unicode code points. The
|
||||
// upper bound matters: bcrypt would silently truncate, which is why this
|
||||
// project uses Argon2id instead.
|
||||
func ValidatePassword(password string) string {
|
||||
if blank(password) {
|
||||
return "password must not be empty or only whitespace"
|
||||
}
|
||||
|
||||
if !strLenBetween(password, 12, 128) {
|
||||
return "password must be between 12 and 128 Unicode code points"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user