0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

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 committed by Fabien O'Carroll
parent eb22429338
commit 305d13e5c4

View file

@ -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;