forked from svrjs/svrjs
Complete out previous fix
This commit is contained in:
parent
08816fe4f3
commit
2c93e0fc24
2 changed files with 6 additions and 4 deletions
|
@ -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
4
svr.js
|
@ -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;
|
||||||
|
|
Reference in a new issue