From a2c23e0245ea9d1a362e36cb2903517d62ccbbd5 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Mon, 14 Aug 2023 19:39:23 +0200 Subject: [PATCH] Prevent configuration leakage in Windows --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 19776c4..a1d2614 100644 --- a/index.js +++ b/index.js @@ -260,7 +260,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e callServerError(500, "OrangeCircle/" + version, ex); } } - } else if (href == "/orangecircle-config.json" && path.normalize(__dirname + "/../../..") == process.cwd()) { + } else if ((href == "/orangecircle-config.json" || (os.platform() == "win32" && href.toLowerCase() == "/orangecircle-config.json")) && path.normalize(__dirname + "/../../..") == process.cwd()) { if (!callServerError) { res.writeHead(200, "OK", { "Content-Type": "application/json",