Skip to content

Commit

Permalink
Avoid XSS
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Feb 15, 2020
1 parent 3c2db4b commit a340e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Server extends EventEmitter {
if (err) {
log.error(err.message);
if (err.code === 'ENOENT') {
res.status(404).send(`Not found: ${req.url}`);
res.status(404).send(`Not found: ${req.url.replace(/&/g,'&amp;').replace(/</g,'&lt;')}`);
} else {
res.status(500).send(err.message);
}
Expand Down

0 comments on commit a340e18

Please sign in to comment.