ipn/localapi: only require read access to list file targets

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1696/head
Brad Fitzpatrick 3 years ago
parent d17f96b586
commit 1f4cf1a4f4

@ -300,8 +300,8 @@ func (h *Handler) serveFiles(w http.ResponseWriter, r *http.Request) {
} }
func (h *Handler) serveFileTargets(w http.ResponseWriter, r *http.Request) { func (h *Handler) serveFileTargets(w http.ResponseWriter, r *http.Request) {
if !h.PermitWrite { if !h.PermitRead {
http.Error(w, "file access denied", http.StatusForbidden) http.Error(w, "access denied", http.StatusForbidden)
return return
} }
if r.Method != "GET" { if r.Method != "GET" {

Loading…
Cancel
Save