redact the password so it is never displayed in logs

This commit is contained in:
Girish Ramakrishnan
2017-05-05 15:36:47 -07:00
parent 423c4446de
commit 8ae65661dd

View File

@@ -153,6 +153,8 @@ function verifyPassword(req, res, next) {
if (error && error.reason === UserError.NOT_FOUND) return next(new HttpError(403, 'Password incorrect'));
if (error) return next(new HttpError(500, error));
req.body.password = '<redacted>'; // this will prevent logs from displaying plain text password
next();
});
}