Skip to content

Commit

Permalink
Fixed sanitization issue in subscribers
Browse files Browse the repository at this point in the history
no issue

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

Credits: Antony Garand
  • Loading branch information
naz authored and allouis committed Nov 7, 2018
1 parent eb22429 commit 305d13e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/server/apps/subscribers/lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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;
Expand Down

0 comments on commit 305d13e

Please sign in to comment.