mirror of
https://github.com/muety/wakapi.git
synced 2025-12-05 22:20:24 -08:00
fix: disallow blank space usernames
This commit is contained in:
@@ -185,7 +185,7 @@ func (r *UserDataUpdate) IsValid() bool {
|
||||
}
|
||||
|
||||
func ValidateUsername(username string) bool {
|
||||
return len(username) >= 1 && username != "current"
|
||||
return len(username) >= 1 && username != "current" && !strings.Contains(username, " ")
|
||||
}
|
||||
|
||||
func ValidatePassword(password string) bool {
|
||||
|
||||
Reference in New Issue
Block a user