input validation (truncation mostly)

This commit is contained in:
Michael Stapelberg
2020-06-20 11:24:56 +02:00
parent 32f7e8a5c5
commit aceddb388b
3 changed files with 93 additions and 15 deletions

View File

@@ -185,7 +185,7 @@ func debugHTML(w http.ResponseWriter, r *http.Request, prefix string, qrch *qrbi
}
fmt.Fprintf(w, `<div class="qrch"><h1>input</h1>%s</div>`, spew(qrch))
fmt.Fprintf(w, `<div class="qrch"><h1>validated</h1>%s</div>`, spew(qrch.Fill()))
fmt.Fprintf(w, `<div class="qrch"><h1>validated</h1>%s</div>`, spew(qrch.Validate()))
r.URL.Path = "/qr"
v := r.URL.Query()