File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2267,9 +2267,9 @@ text-unidecode==1.3 \
2267
2267
--hash=sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8 \
2268
2268
--hash=sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93
2269
2269
# via python-slugify
2270
- tldextract==5.2 .0 \
2271
- --hash=sha256:59509cbf99628c9440f4d19d3a1fd8488d50297ea23879c136576263c5a04eba \
2272
- --hash=sha256:c3a8c4daf2c25a57f54d6ef6762aeac7eff5ac3da04cdb607130be757b8457ab
2270
+ tldextract==5.3 .0 \
2271
+ --hash=sha256:b3d2b70a1594a0ecfa6967d57251527d58e00bb5a91a74387baa0d87a0678609 \
2272
+ --hash=sha256:f70f31d10b55c83993f55e91ecb7c5d84532a8972f22ec578ecfbe5ea2292db2
2273
2273
# via -r requirements/main.in
2274
2274
transaction==5.0 \
2275
2275
--hash=sha256:106e7bd782bcc0cb5119fc9225b0c9a71dfc53adb938be905223adaef22b1174 \
Original file line number Diff line number Diff line change @@ -292,12 +292,12 @@ def validate_email(self, field):
292
292
293
293
# Check if the domain is valid
294
294
extractor = TLDExtract (suffix_list_urls = ()) # Updated during image build
295
- domain = extractor (resp .domain .lower ()).registered_domain
295
+ domain = extractor (resp .domain .lower ()).top_domain_under_public_suffix
296
296
297
297
mx_domains = set ()
298
298
if hasattr (resp , "mx" ) and resp .mx :
299
299
mx_domains = {
300
- extractor (mx_host .lower ()).registered_domain
300
+ extractor (mx_host .lower ()).top_domain_under_public_suffix
301
301
for _prio , mx_host in resp .mx
302
302
}
303
303
mx_domains .update ({mx_host .lower () for _prio , mx_host in resp .mx })
@@ -315,7 +315,7 @@ def validate_email(self, field):
315
315
mx_ptr = dns .resolver .resolve_address (mx_ip [0 ].address )
316
316
mx_ptr_domain = extractor (
317
317
mx_ptr [0 ].target .to_text ().lower ()
318
- ).registered_domain
318
+ ).top_domain_under_public_suffix
319
319
all_mx_domains .add (mx_ptr_domain )
320
320
321
321
# combine both sets
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def add_prohibited_email_domain(request):
69
69
raise HTTPSeeOther (request .route_path ("admin.prohibited_email_domains.list" ))
70
70
# validate that the domain is valid
71
71
extractor = TLDExtract (suffix_list_urls = ()) # Updated during image build
72
- registered_domain = extractor (email_domain ).registered_domain
72
+ registered_domain = extractor (email_domain ).top_domain_under_public_suffix
73
73
if not registered_domain :
74
74
request .session .flash (f"Invalid domain name '{ email_domain } '" , queue = "error" )
75
75
raise HTTPSeeOther (request .route_path ("admin.prohibited_email_domains.list" ))
You can’t perform that action at this time.
0 commit comments