mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
signup: Add optional Altcha to realm registration.
This commit is contained in:
committed by
Tim Abbott
parent
f434c9d913
commit
eae18738a6
@@ -68,6 +68,7 @@ from .configured_settings import (
|
||||
STATIC_URL,
|
||||
SUBMIT_USAGE_STATISTICS,
|
||||
TORNADO_PORTS,
|
||||
USING_CAPTCHA,
|
||||
USING_PGROONGA,
|
||||
ZULIP_ADMINISTRATOR,
|
||||
ZULIP_SERVICE_PUSH_NOTIFICATIONS,
|
||||
@@ -462,6 +463,11 @@ if DEVELOPMENT:
|
||||
else:
|
||||
TOR_EXIT_NODE_FILE_PATH = "/var/lib/zulip/tor-exit-nodes.json"
|
||||
|
||||
if USING_CAPTCHA:
|
||||
ALTCHA_HMAC_KEY = get_mandatory_secret("altcha_hmac")
|
||||
else:
|
||||
ALTCHA_HMAC_KEY = ""
|
||||
|
||||
########################################################################
|
||||
# SECURITY SETTINGS
|
||||
########################################################################
|
||||
|
||||
@@ -259,6 +259,7 @@ RATE_LIMIT_TOR_TOGETHER = False
|
||||
SEND_LOGIN_EMAILS = True
|
||||
EMBEDDED_BOTS_ENABLED = False
|
||||
|
||||
USING_CAPTCHA = False
|
||||
DEFAULT_RATE_LIMITING_RULES = {
|
||||
# Limits total number of API requests per unit time by each user.
|
||||
# Rate limiting general API access protects the server against
|
||||
|
||||
@@ -26,6 +26,7 @@ from zerver.tornado.views import (
|
||||
web_reload_clients,
|
||||
)
|
||||
from zerver.views.alert_words import add_alert_words, list_alert_words, remove_alert_words
|
||||
from zerver.views.antispam import get_challenge
|
||||
from zerver.views.attachments import list_by_user, remove
|
||||
from zerver.views.auth import (
|
||||
api_fetch_api_key,
|
||||
@@ -640,6 +641,7 @@ i18n_urls = [
|
||||
# Go to organization subdomain
|
||||
path("accounts/go/", realm_redirect, name="realm_redirect"),
|
||||
# Realm creation
|
||||
path("json/antispam_challenge", get_challenge),
|
||||
path("new/", create_realm),
|
||||
path("new/<creation_key>", create_realm, name="create_realm"),
|
||||
# Realm reactivation
|
||||
|
||||
Reference in New Issue
Block a user