formacao
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ var serveStatic = (options) => {
|
||||
} else {
|
||||
try {
|
||||
filename = tryDecodeURI(c.req.path);
|
||||
if (/(?:^|[\/\\])\.\.(?:$|[\/\\])/.test(filename)) {
|
||||
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user