1
0
mirror of https://api.glitch.com/git/presence-button synced 2024-11-05 13:57:29 +00:00

🛳🍙 Checkpoint

./server.js:933874/84
This commit is contained in:
Glitch (hello-express) 2019-11-03 15:47:00 +00:00
parent d3c87768d6
commit 2f679e086b

View File

@ -47,7 +47,8 @@ app.get("/status", (req, res) => {
// parse login and password from headers // parse login and password from headers
const b64auth = (req.headers.authorization || "").split(" ")[1] || ""; 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 ( if (
!login || !login ||
!password || !password ||