From 1f4cf1a4f461ddbc132c98ad81f1e89e0f94b5a1 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 13 Apr 2021 08:35:16 -0700 Subject: [PATCH] ipn/localapi: only require read access to list file targets Signed-off-by: Brad Fitzpatrick --- ipn/localapi/localapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go index 8bd82c501..8e57f85e1 100644 --- a/ipn/localapi/localapi.go +++ b/ipn/localapi/localapi.go @@ -300,8 +300,8 @@ func (h *Handler) serveFiles(w http.ResponseWriter, r *http.Request) { } func (h *Handler) serveFileTargets(w http.ResponseWriter, r *http.Request) { - if !h.PermitWrite { - http.Error(w, "file access denied", http.StatusForbidden) + if !h.PermitRead { + http.Error(w, "access denied", http.StatusForbidden) return } if r.Method != "GET" {