more relaxed name check for honker
Ted Unangst tedu@tedunangst.com
Fri, 02 Apr 2021 19:59:01 -0400
M
web.go
→
web.go
@@ -1851,7 +1851,8 @@ combos := strings.TrimSpace(r.FormValue("combos"))
combos = " " + combos + " " honkerid, _ := strconv.ParseInt(r.FormValue("honkerid"), 10, 0) - if name != "" && !re_plainname.MatchString(name) { + re_namecheck := regexp.MustCompile("[[:alnum:]_.-]+") + if name != "" && !re_namecheck.MatchString(name) { http.Error(w, "please use a plainer name", http.StatusInternalServerError) return }@@ -1897,7 +1898,7 @@
if url[0] == '#' { flavor = "peep" if name == "" { - name = url + name = url[1:] } _, err := stmtSaveHonker.Exec(u.UserID, name, url, flavor, combos, url, mj) if err != nil {