You've already forked Mailu
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:
@@ -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()
|
||||
|
1
towncrier/newsfragments/2429.feature
Normal file
1
towncrier/newsfragments/2429.feature
Normal file
@@ -0,0 +1 @@
|
||||
Prevent signups with accounts for which an SQL-LIKE alias exists.
|
Reference in New Issue
Block a user