mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-18 20:51:45 +00:00
ipn/localapi: only require read access to list file targets
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
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…
x
Reference in New Issue
Block a user