diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2022-11-16 08:16:17 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2022-11-16 08:18:12 -0800 |
| commit | 4fc8538e2f2afd7eb16e3f23394f2d2acb2db2ee (patch) | |
| tree | fb050375f36d6e26043f05f3daa80ab65c43ba93 | |
| parent | 49b0ce818024e70e17abf82593854a432fc6b40b (diff) | |
| download | tailscale-4fc8538e2f2afd7eb16e3f23394f2d2acb2db2ee.tar.xz tailscale-4fc8538e2f2afd7eb16e3f23394f2d2acb2db2ee.zip | |
ipn/ipnlocal: check quad100 Host header in info page
Updates tailscale/corp#7948
Change-Id: I0ab61c764bff9ba8afaf9070db73e971eb018477
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
| -rw-r--r-- | ipn/ipnlocal/local.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 7df12245d..fc5f87597 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -3906,6 +3906,12 @@ func (b *LocalBackend) handleQuad100Port80Conn(w http.ResponseWriter, r *http.Re http.Error(w, "method not allowed", http.StatusMethodNotAllowed) return } + switch r.Host { + case "", tsaddr.TailscaleServiceIP().String(), tsaddr.TailscaleServiceIPv6().String(): + default: + http.Error(w, "bad request", http.StatusBadRequest) + return + } b.mu.Lock() defer b.mu.Unlock() |
