surround email in case of error

fix https://huntr.dev/bounties/441cc44c-6837-46ec-9b30-52455aa71a2f/
This commit is contained in:
Glandos 2022-07-16 22:59:35 +02:00
parent e9b7426a98
commit 93f5322ede

View file

@ -41,6 +41,7 @@ from wtforms.validators import (
from ihatemoney.currency_convertor import CurrencyConverter
from ihatemoney.models import Bill, LoggingMode, Person, Project
from ihatemoney.utils import (
em_surround,
eval_arithmetic_expression,
render_localized_currency,
slugify,
@ -439,7 +440,7 @@ class InviteForm(FlaskForm):
email_validator.validate_email(email)
except email_validator.EmailNotValidError:
raise ValidationError(
_("The email %(email)s is not valid", email=email)
_("The email %(email)s is not valid", email=em_surround(email))
)