Unexpectedly serves files from outside the given ROOT directory.
live-server is serving files outside the given directory and this is unexpected:
```
## Create new empty test directory that we want to serve from:
mkdir test
cd test
echo "hello" > index.html
live-server -p 8000
```
Open the URL `http://localhost:8000//etc/passwd` and see that files are served from outside the given directory.
There should be a check to make sure that the paths served are not from any parent directory.
关闭于 2025-02-16 1 条评论