1
0
Fork 0
forked from svrjs/svrjs

Complete out previous fix

This commit is contained in:
Dorian Niemiec 2023-09-06 20:22:51 +02:00
parent 08816fe4f3
commit 2c93e0fc24
2 changed files with 6 additions and 4 deletions

View file

@ -1,9 +1,9 @@
{ {
"users": [], "users": [],
"port": 5555, "port": 80,
"pubport": 80, "pubport": 80,
"page404": "404.html", "page404": "404.html",
"timestamp": 1694020816055, "timestamp": 1694024561052,
"blacklist": [], "blacklist": [],
"nonStandardCodes": [], "nonStandardCodes": [],
"enableCompression": true, "enableCompression": true,

4
svr.js
View file

@ -4215,7 +4215,9 @@ if (!cluster.isPrimary) {
} }
var sHref = sanitizeURL(href); var sHref = sanitizeURL(href);
if (sHref != href.replace(/\/\.(?=\/|$)/g, "/").replace(/\/+/g, "/")) { var preparedReqUrl2 = uobject.pathname + (uobject.search ? uobject.search : "") + (uobject.hash ? uobject.hash : "");
if (req.url != preparedReqUrl2 || sHref != href.replace(/\/\.(?=\/|$)/g, "/").replace(/\/+/g, "/")) {
callServerError(403); callServerError(403);
serverconsole.errmessage("Content blocked."); serverconsole.errmessage("Content blocked.");
return; return;