mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: disallow blank space usernames
This commit is contained in:
parent
3512db5ca4
commit
f67115a788
@ -185,7 +185,7 @@ func (r *UserDataUpdate) IsValid() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ValidateUsername(username string) 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 {
|
func ValidatePassword(password string) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user