fix(app) backported some things agent broke in lab2 and bugfixed other autocheck issues manually

This commit is contained in:
imadev
2026-10-24 00:39:07 +03:00
parent c1b25c507d
commit d14fed291e
6 changed files with 26 additions and 24 deletions
+4 -3
View File
@@ -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"
}