mirror of
https://github.com/simple-login/app.git
synced 2024-11-15 13:14:36 +08:00
do not accept email without MX record
This commit is contained in:
parent
96366ddcfa
commit
6acbf2f8dc
1 changed files with 5 additions and 0 deletions
|
@ -328,6 +328,11 @@ def can_be_used_as_personal_email(email: str) -> bool:
|
||||||
|
|
||||||
# check if email MX domain is disposable
|
# check if email MX domain is disposable
|
||||||
mx_domains = get_mx_domain_list(domain)
|
mx_domains = get_mx_domain_list(domain)
|
||||||
|
|
||||||
|
# if no MX record, email is not valid
|
||||||
|
if not mx_domains:
|
||||||
|
return False
|
||||||
|
|
||||||
for mx_domain in mx_domains:
|
for mx_domain in mx_domains:
|
||||||
if is_disposable_domain(mx_domain):
|
if is_disposable_domain(mx_domain):
|
||||||
LOG.d("MX Domain %s %s is disposable", mx_domain, domain)
|
LOG.d("MX Domain %s %s is disposable", mx_domain, domain)
|
||||||
|
|
Loading…
Reference in a new issue