Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
demo-orgs: Limit random subdomain to MAX_REALM_SUBDOMAIN_LENGTH.
Lauryn Menard069a1de98834
diff --git a/zerver/views/registration.py b/zerver/views/registration.pyindex 3623f8790fe..4b35fe6c342 100644--- a/zerver/views/registration.py+++ b/zerver/views/registration.py@@ -1430,6 +1430,8 @@ def generate_demo_realm_subdomain() -> str:adjective = random.SystemRandom().choice(demo_organization_words["adjectives"])noun = random.SystemRandom().choice(demo_organization_words["nouns"])demo_subdomain = f"{adverb}-{adjective}-{noun}"+ if len(demo_subdomain) > Realm.MAX_REALM_SUBDOMAIN_LENGTH: # nocoverage+ continuetry:check_subdomain_available(demo_subdomain)break