diff --git a/main.go b/main.go index a81eb7a..711d1d6 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,11 @@ func main() { } func randomNumber(w http.ResponseWriter, r *http.Request) { name := r.URL.Query().Get("name") + if len(name) > 15 { + w.WriteHeader(400) + return + } + chance, err := strconv.Atoi(r.URL.Query().Get("chance")) if err != nil { w.WriteHeader(400)