email_validation: Restore case-insensitive domain validation.

This was broken by commit b945aa3443
(#22604), because email_to_domain implicitly lowercased the result.

No adjustment is needed for is_disposable_domain, which already
lowercases its argument.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-10-19 20:01:24 -04:00
committed by Tim Abbott
parent 8dc0653740
commit c5c180fda3
2 changed files with 4 additions and 4 deletions

View File

@@ -62,7 +62,7 @@ def get_realm_email_validator(realm: Realm) -> Callable[[str], None]:
if "+" in address.username:
raise EmailContainsPlusError
domain = address.domain
domain = address.domain.lower()
if domain in allowed_domains:
return