~singpolyma/xmpp-certwatch

fd0032a3369263efb05a46935d9698d130ab4be1 — Stephen Paul Weber 5 months ago f4b92e7
Verify params
1 files changed, 6 insertions(+), 1 deletions(-)

M cmd/web/main.go
M cmd/web/main.go => cmd/web/main.go +6 -1
@@ 27,7 27,12 @@ var xmppSession *xmpp.Session

func checkOneHandler(w http.ResponseWriter, r *http.Request) {
	r.ParseForm()
	fqdn := strings.ToLower(r.PostForm["fqdn"][0])
	fqdns, ok := r.PostForm["fqdn"]
	if !ok || len(fqdns) != 1 {
		http.Error(w, "Must pass one fqdn parameter", 400)
		return
	}
	fqdn := strings.ToLower(fqdns[0])
	result := CheckOne(fqdn)

	if result.Err != nil {