mirror of
https://github.com/mathuo/dockview
synced 2025-03-09 23:42:05 +00:00
Merge pull request #759 from JafarAkhondali/master
Fixing a Path Traversal Vulnerability
This commit is contained in:
commit
93b29e77c4
@ -35,5 +35,10 @@ function write(res, file) {
|
||||
|
||||
http.createServer((req, res) => {
|
||||
const route = req.url.split('/').slice(1);
|
||||
if (route.includes('..')) {
|
||||
res.writeHead(403);
|
||||
res.end('');
|
||||
return;
|
||||
}
|
||||
write(res, route);
|
||||
}).listen(PORT, HOST);
|
||||
|
Loading…
Reference in New Issue
Block a user