mirror of https://github.com/calzoneman/sync.git
Prevent invalid URI escapes from logging errors
This commit is contained in:
parent
ae4f159cf7
commit
4a3645e3ed
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue