1
0
Fork 0

Fix space on haveibeenpwned path

This commit is contained in:
Ethanell 2020-06-09 16:42:10 +02:00
parent b008e9088a
commit 3bf30bd63f
2 changed files with 1 additions and 2 deletions

2
app.js
View file

@ -28,7 +28,7 @@ io.on("connection", (socket) => {
let request = https.request({ let request = https.request({
hostname: "haveibeenpwned.com", hostname: "haveibeenpwned.com",
port: 443, port: 443,
path: "/api/v3/breachedaccount/" + data.email, path: "/api/v3/breachedaccount/" + data.email.trim().replace(" ", "%20"),
method: "GET", method: "GET",
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',

View file

@ -3,4 +3,3 @@ module.exports = (err, req, res, next) => {
res.status(500); res.status(500);
res.render("error", {session: req.session}); res.render("error", {session: req.session});
} }