84f7e33872
The server answered any Host, so a DNS-rebinding page reached /connect (101) and could drive terminals. Every route now refuses a non-loopback Host on a loopback connection (421), /connect refuses any Origin (403), and a server started with -token-file requires X-Pipelines-Token (401; /mcp and /healthz exempt). The CLI/TUI send the token only to loopback URLs.
9 lines
177 B
Go
9 lines
177 B
Go
//go:build !unix
|
|
|
|
package servertoken
|
|
|
|
import "os"
|
|
|
|
// Windows has no POSIX mode bits; the file lives in the user's profile.
|
|
func private(info os.FileInfo) bool { return true }
|