Block the greenrhombus-scriptexts.json file from hackers (return 403 code)
This commit is contained in:
parent
47068ba0b0
commit
6389070cb9
2 changed files with 1 additions and 1 deletions
BIN
.index.js.swp
Normal file
BIN
.index.js.swp
Normal file
Binary file not shown.
2
index.js
2
index.js
|
@ -579,7 +579,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
|||
callServerError(500, "GreenRhombus/" + version, ex);
|
||||
}
|
||||
}
|
||||
} else if ((href == "/greenrhombus-config.json" || (os.platform() == "win32" && href.toLowerCase() == "/greenrhombus-config.json")) && path.normalize(__dirname + "/../../..") == process.cwd()) {
|
||||
} else if ((href == "/greenrhombus-config.json" || (os.platform() == "win32" && href.toLowerCase() == "/greenrhombus-config.json")) && path.normalize(__dirname + "/../../..") == process.cwd() || (href == "/greenrhombus-scriptexts.json" || (os.platform() == "win32" && href.toLowerCase() == "/greenrhombus-scriptexts.json")) && path.normalize(__dirname + "/../../..") == process.cwd()) {
|
||||
if (!callServerError) {
|
||||
res.writeHead(200, "OK", {
|
||||
"Content-Type": "application/json",
|
||||
|
|
Loading…
Reference in a new issue