security: fix self-xss on modifing gist filename.

This commit is contained in:
Daniel Dourvaris 2017-07-24 12:49:38 +02:00
parent 3b524b7875
commit b253e2b02e

View file

@ -378,7 +378,7 @@ class GistView(BaseAppView):
Session().commit()
h.flash(_('Successfully updated gist data'), category='success')
except validation_schema.Invalid as errors:
errors = errors.asdict()
errors = h.escape(errors.asdict())
h.flash(_('Error occurred during update of gist {}: {}').format(
gist_id, errors), category='error')
except Exception: