From a49f98b228fa9eeb7d6d098870a8fdedee3946ef Mon Sep 17 00:00:00 2001 From: Danielv123 Date: Thu, 5 Jan 2017 13:19:45 +0100 Subject: [PATCH] Stop sending rcon passwords because security and stuff --- master.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/master.js b/master.js index c5b31dcb..6c56db23 100644 --- a/master.js +++ b/master.js @@ -61,7 +61,12 @@ app.post("/getID", function(req,res) { app.get("/slaves", function(req, res) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); - res.send(slaves) + let copyOfSlaves = slaves + // filter out the rcon password because thats kindof not a safe thing to share + for(key in copyOfSlaves) { + copyOfSlaves[key].rconPassword = "hidden"; + } + res.send(copyOfSlaves) }); // endpoint to send items to