fix: disallow blank space usernames

This commit is contained in:
Ferdinand Mütsch 2023-02-19 19:41:20 +01:00
parent 3512db5ca4
commit f67115a788
1 changed files with 1 additions and 1 deletions

View File

@ -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 {