From a4fff91e96ee8d7e2d1613559e2033d623f85de7 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Wed, 19 Mar 2025 17:18:28 +0100 Subject: [PATCH] signup: Add "airsi.de" as an allowed email domain. Renames WHITELISTED_EMAIL_DOMAINS to OVERRIDE_ALLOW_EMAIL_DOMAINS as the set of email domains that are allowed even if they are in the set of disposable email domains. --- zerver/lib/name_restrictions.py | 5 +++-- zerver/tests/test_signup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zerver/lib/name_restrictions.py b/zerver/lib/name_restrictions.py index b570c4d4bc..d43e97cfc6 100644 --- a/zerver/lib/name_restrictions.py +++ b/zerver/lib/name_restrictions.py @@ -21,7 +21,7 @@ def is_reserved_subdomain(subdomain: str) -> bool: def is_disposable_domain(domain: str) -> bool: - if domain.lower() in WHITELISTED_EMAIL_DOMAINS: + if domain.lower() in OVERRIDE_ALLOW_EMAIL_DOMAINS: return False return domain.lower() in DISPOSABLE_DOMAINS @@ -371,7 +371,8 @@ GENERIC_RESERVED_SUBDOMAINS = { DISPOSABLE_DOMAINS = set(blocklist) -WHITELISTED_EMAIL_DOMAINS = { +OVERRIDE_ALLOW_EMAIL_DOMAINS = { + "airsi.de", # Controlled by https://www.abine.com; more legitimate than most # disposable domains "opayq.com", diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index 1175b36a40..7939499459 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -4683,7 +4683,7 @@ class TwoFactorAuthTest(ZulipTestCase): class NameRestrictionsTest(ZulipTestCase): - def test_whitelisted_disposable_domains(self) -> None: + def test_override_allow_email_domains(self) -> None: self.assertFalse(is_disposable_domain("OPayQ.com"))