From f475aa8651bbe33b34920b1376c5a75329b2f49f Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 9 Sep 2023 00:53:24 +0200 Subject: [PATCH] Remove one obsolete process.cwd() == __dirname check --- svr.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/svr.js b/svr.js index 1433be5..637851a 100644 --- a/svr.js +++ b/svr.js @@ -2282,7 +2282,7 @@ if (!cluster.isPrimary) { if(err) { callback(errorCode.toString() + ".html"); } else { - callback("." + errorCode.toString()); + callback("." + errorCode.toString()); } } catch(err2) { callServerError(500, undefined, generateErrorStack(err2)); @@ -2302,7 +2302,7 @@ if (!cluster.isPrimary) { if(err) { callback(errorCode.toString() + ".html"); } else { - callback("." + errorCode.toString()); + callback("." + errorCode.toString()); } } catch(err2) { callServerError(500, undefined, generateErrorStack(err2)); @@ -2326,7 +2326,7 @@ if (!cluster.isPrimary) { if(err) { getErrorFileName(list, callback, _i+1); } else { - medCallback(list[_i].path); + medCallback(list[_i].path); } }); } @@ -4290,7 +4290,7 @@ if (!cluster.isPrimary) { callServerError(403); serverconsole.errmessage("Access to log files is denied."); return; - } else if (isForbiddenPath(decodedHref, "svrjs") && !isProxy && !exposeServerVersion && process.cwd() == __dirname) { + } else if (isForbiddenPath(decodedHref, "svrjs") && !isProxy && !exposeServerVersion) { callServerError(403); serverconsole.errmessage("Access to SVR.JS script is denied."); return;