From 2f679e086b7d948c2740ac03f6a28a818279ccf5 Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Sun, 3 Nov 2019 15:47:00 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=B3=F0=9F=8D=99=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 5f92162..c188e2b 100644 --- a/server.js +++ b/server.js @@ -47,7 +47,8 @@ app.get("/status", (req, res) => { // parse login and password from headers const b64auth = (req.headers.authorization || "").split(" ")[1] || ""; - const [_, login, password] = new Buffer(b64auth, 'base64').toString().match(/(.*):(.*)/) || []; // slightly modified as + const [_, login, password] = new Buffer(b64auth, 'base64').toString().match(/(.*):(.*)/) || []; // slightly modified as we use : in username + if ( !login || !password ||