Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Commit

Permalink
XSS menace fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurowaniecki committed May 16, 2020
1 parent bcd8d50 commit f58ea41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ROUTES {
}

notFound(req, res, next) {
var err = new Error(`<h1>Oops!</h1><h2>Yeah.. This is a boring 404 - not found page.</h2><p>The requested "<b>${req.url}</b>" is in another place.</p>`);
var err = new Error(`<h1>Oops!</h1><h2>Yeah.. This is a boring 404 - not found page.</h2><p>The requested "<b>${escape(req.url)}</b>" is in another place.</p>`);

if (req.url === '/') {
return res
Expand All @@ -38,9 +38,9 @@ class ROUTES {
.status(err.status || 500)
.header('Warning', "You'll be redirected soon..")
.redirect('/');

res
.send(err.message);

}
};

Expand Down

0 comments on commit f58ea41

Please sign in to comment.