1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-09-16 09:06:32 +02:00

Prevent signups with accounts where an alias exists

This commit is contained in:
Florent Daigniere
2022-08-27 18:09:52 +02:00
parent d0113800fe
commit 30b3a3771e
2 changed files with 2 additions and 1 deletions

View File

@@ -167,7 +167,7 @@ def user_signup(domain_name=None):
form = forms.UserSignupFormCaptcha()
if form.validate_on_submit():
if domain.has_email(form.localpart.data):
if domain.has_email(form.localpart.data) or models.Alias.resolve(form.localpart.data, domain_name):
flask.flash('Email is already used', 'error')
else:
flask.session.regenerate()

View File

@@ -0,0 +1 @@
Prevent signups with accounts for which an SQL-LIKE alias exists.