Prevent invalid URI escapes from logging errors

This commit is contained in:
Calvin Montgomery 2014-08-07 19:25:34 -07:00
parent ae4f159cf7
commit 4a3645e3ed

View file

@ -309,7 +309,9 @@ module.exports = {
app.use(static(path.join("..", "..", "www")));
app.use(function (err, req, res, next) {
if (err) {
Logger.errlog.log(err);
if (err.message && err.message.match(/failed to decode param/i)) {
return res.status(400).send("Malformed path: " + req.path);
}
Logger.errlog.log(err.stack);
res.send(500);
} else {