mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 05:54:19 +01:00
Change email whitelist error message to not include the list of allowed domains (#2286)
* Change email whitelist error message to not include the list of allowed domains
This commit is contained in:
@@ -265,11 +265,7 @@ def register():
|
||||
if not valid_email:
|
||||
errors.append("Please enter a valid email address")
|
||||
if email.check_email_is_whitelisted(email_address) is False:
|
||||
errors.append(
|
||||
"Only email addresses under {domains} may register".format(
|
||||
domains=get_config("domain_whitelist")
|
||||
)
|
||||
)
|
||||
errors.append("Your email address is not from an allowed domain")
|
||||
if names:
|
||||
errors.append("That user name is already taken")
|
||||
if team_name_email_check is True:
|
||||
|
||||
@@ -150,9 +150,7 @@ class UserSchema(ma.ModelSchema):
|
||||
)
|
||||
if check_email_is_whitelisted(email) is False:
|
||||
raise ValidationError(
|
||||
"Only email addresses under {domains} may register".format(
|
||||
domains=get_config("domain_whitelist")
|
||||
),
|
||||
"Email address is not from an allowed domain",
|
||||
field_names=["email"],
|
||||
)
|
||||
if get_config("verify_emails"):
|
||||
|
||||
Reference in New Issue
Block a user