Prevent configuration leakage in Windows

This commit is contained in:
Dorian Niemiec 2023-08-14 19:39:23 +02:00
parent 91e03e5866
commit a2c23e0245

View file

@ -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",