security: fix self-xss inside the email add functionality.
This commit is contained in:
parent
3aa700c435
commit
a9ea42785b
2 changed files with 2 additions and 4 deletions
|
|
@ -291,8 +291,7 @@ class AdminUsersView(BaseAppView, DataGridAppView):
|
|||
h.flash(_("Added new email address `%s` for user account") % email,
|
||||
category='success')
|
||||
except formencode.Invalid as error:
|
||||
msg = error.error_dict['email']
|
||||
h.flash(msg, category='error')
|
||||
h.flash(h.escape(error.error_dict['email']), category='error')
|
||||
except Exception:
|
||||
log.exception("Exception during email saving")
|
||||
h.flash(_('An error occurred during email saving'),
|
||||
|
|
|
|||
|
|
@ -253,8 +253,7 @@ class MyAccountView(BaseAppView):
|
|||
h.flash(_("Added new email address `%s` for user account") % email,
|
||||
category='success')
|
||||
except formencode.Invalid as error:
|
||||
msg = error.error_dict['email']
|
||||
h.flash(msg, category='error')
|
||||
h.flash(h.escape(error.error_dict['email']), category='error')
|
||||
except Exception:
|
||||
log.exception("Exception in my_account_emails")
|
||||
h.flash(_('An error occurred during email saving'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue