ipn/ipnlocal: validate ping type (#8458)

Correct a minor cut-n-paste error that resulted in an invalid or
missing ping type being accepted as a disco ping.

Fixes #8457

Signed-off-by: Val <valerie@tailscale.com>
pull/8362/head
valscale 11 months ago committed by GitHub
parent 77f56794c9
commit e26376194d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1331,7 +1331,7 @@ func (h *Handler) servePing(w http.ResponseWriter, r *http.Request) {
return
}
pingTypeStr := r.FormValue("type")
if ipStr == "" {
if pingTypeStr == "" {
http.Error(w, "missing 'type' parameter", 400)
return
}

Loading…
Cancel
Save