From e8d1d64f1c82beec55f33c9a250fb02e8050cee7 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 26 Feb 2023 12:08:43 -0500 Subject: [PATCH] namecheck regexp should match whole string --- web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web.go b/web.go index c83e492..42de0e0 100644 --- a/web.go +++ b/web.go @@ -1904,7 +1904,7 @@ func submithonker(w http.ResponseWriter, r *http.Request) *Honker { combos = " " + combos + " " honkerid, _ := strconv.ParseInt(r.FormValue("honkerid"), 10, 0) - re_namecheck := regexp.MustCompile("[\\pL[:digit:]_.-]+") + re_namecheck := regexp.MustCompile("^[\\pL[:digit:]_.-]+$") if name != "" && !re_namecheck.MatchString(name) { http.Error(w, "please use a plainer name", http.StatusInternalServerError) return nil