summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-23 14:29:08 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-23 14:29:08 +0100
commit3a8a94448af334e57c5cfa3583b2c20739aeb613 (patch)
tree6592074fdbb208abeb78d1c291987f985ee1bd70 /synapse/config
parentShow display name changes in the message list. (diff)
downloadsynapse-3a8a94448af334e57c5cfa3583b2c20739aeb613.tar.xz
Allow a (hidden undocumented) key to m.login.recaptcha to specify a shared secret to allow bots to bypass the ReCAPTCHA test (SYN-60)
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/captcha.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/config/captcha.py b/synapse/config/captcha.py
index 8ebcfc3623..4ed9070b9e 100644
--- a/synapse/config/captcha.py
+++ b/synapse/config/captcha.py
@@ -24,6 +24,7 @@ class CaptchaConfig(Config):
         self.captcha_ip_origin_is_x_forwarded = (
             args.captcha_ip_origin_is_x_forwarded
         )
+        self.captcha_bypass_secret = args.captcha_bypass_secret
 
     @classmethod
     def add_arguments(cls, parser):
@@ -43,4 +44,8 @@ class CaptchaConfig(Config):
             "--captcha_ip_origin_is_x_forwarded", type=bool, default=False,
             help="When checking captchas, use the X-Forwarded-For (XFF) header"
             + " as the client IP and not the actual client IP."
-        )
\ No newline at end of file
+        )
+        group.add_argument(
+            "--captcha_bypass_secret", type=str,
+            help="A secret key used to bypass the captcha test entirely."
+        )