forked from mtusi2026/mtusi2026lab3
внес правки
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/sync/singleflight"
|
||||
@@ -64,11 +63,7 @@ func (a *api) authMiddleware(next func(w http.ResponseWriter, r *http.Request, u
|
||||
}
|
||||
|
||||
func validDisplayName(s string) bool {
|
||||
if strings.TrimSpace(s) == "" {
|
||||
return false
|
||||
}
|
||||
n := utf8.RuneCountInString(s)
|
||||
return n >= 1 && n <= 100
|
||||
return validText(s, 100)
|
||||
}
|
||||
|
||||
func validPassword(s string) bool {
|
||||
|
||||
Reference in New Issue
Block a user