Repository navigation
4fbe7f2
Pre-releasefix(tests): Confine the test static server to its root's real paths
serveTypeScript, which serves the repository to the browser a suite
drives, refused a path that named .. or left its root as written, but
read whatever that path led to, so a symbolic link inside the tree
pointing outside it was served. It now refuses a path whose real path
is outside the root's, sends X-Content-Type-Options: nosniff on every
answer so an error's text is never read as HTML, and answers 400 to a
malformed percent-escape that used to throw in the handler.
Against a scratch tree: a file and a symlink inside the root are
served (200), a symlink out of it is refused (403), .. and %2e%2e
paths find nothing outside it (404), a bad escape is 400, and every
answer carries nosniff.