Fixed sanitization issue in subscribers

no issue

- Added sanitization to subscribed_url & subscribed_referrer fields when rendering error state

Credits: Antony Garand
This commit is contained in:
Nazar Gargol 2018-10-29 10:19:45 +01:00
parent b8fff2321c
commit 308b9ddd40

View File

@ -32,6 +32,8 @@ function _renderer(req, res) {
*/
function errorHandler(error, req, res, next) {
req.body.email = '';
req.body.subscribed_url = santizeUrl(req.body.subscribed_url);
req.body.subscribed_referrer = santizeUrl(req.body.subscribed_referrer);
if (error.statusCode !== 404) {
res.locals.error = error;