namecheck regexp should match whole string
Ted Unangst tedu@tedunangst.com
Sun, 26 Feb 2023 12:08:43 -0500
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
web.go
→
web.go
@@ -1904,7 +1904,7 @@ combos := strings.TrimSpace(r.FormValue("combos"))
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