kewl
This commit is contained in:
1 parent
35817601ff
commit
6f92f0a668
2 files changed
+21
-29
No files matched your search
@@ -330,9 +330,7 @@ export const createServer = Effect.fn(function* (): Effect.fn.Return<
|
||||
const staticRequestPath = url.pathname === "/" ? "/index.html" : url.pathname;
|
||||
const rawStaticRelativePath = staticRequestPath.replace(/^[/\\]+/, "");
|
||||
const hasRawLeadingParentSegment = rawStaticRelativePath.startsWith("..");
|
||||
const staticRelativePath = path
|
||||
.normalize(rawStaticRelativePath)
|
||||
.replace(/^[/\\]+/, "");
|
||||
const staticRelativePath = path.normalize(rawStaticRelativePath).replace(/^[/\\]+/, "");
|
||||
const hasPathTraversalSegment = staticRelativePath.startsWith("..");
|
||||
if (
|
||||
staticRelativePath.length === 0 ||
|
||||
|
||||
Reference in new issue
Block a user