diff --git a/app.js b/app.js index 2d10961..b2400ac 100644 --- a/app.js +++ b/app.js @@ -28,7 +28,7 @@ io.on("connection", (socket) => { let request = https.request({ hostname: "haveibeenpwned.com", port: 443, - path: "/api/v3/breachedaccount/" + data.email, + path: "/api/v3/breachedaccount/" + data.email.trim().replace(" ", "%20"), method: "GET", headers: { Accept: 'application/json', diff --git a/routes/error.js b/routes/error.js index 0f70fdd..c4d84aa 100644 --- a/routes/error.js +++ b/routes/error.js @@ -3,4 +3,3 @@ module.exports = (err, req, res, next) => { res.status(500); res.render("error", {session: req.session}); } -