Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 936aead

Browse files
committed
Fix final syntax checks on normalized internationalized domains checking the wrong variable, but these checks had no tests and no known way to produce a fail
1 parent 8043de4 commit 936aead

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

email_validator/syntax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,12 +629,12 @@ def validate_email_domain_name(domain: str, test_environment: bool = False, glob
629629
# case for this.
630630
bad_chars = {
631631
safe_character_display(c)
632-
for c in domain
632+
for c in domain_i18n
633633
if not ATEXT_HOSTNAME_INTL.match(c)
634634
}
635635
if bad_chars:
636636
raise EmailSyntaxError("The part after the @-sign contains invalid characters: " + ", ".join(sorted(bad_chars)) + ".")
637-
check_unsafe_chars(domain)
637+
check_unsafe_chars(domain_i18n)
638638

639639
# Check that it can be encoded back to IDNA ASCII. We have no test
640640
# case for this.

0 commit comments

Comments
 (0)