summary refs log tree commit diff
path: root/synapse/rest/register.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-23 15:18:59 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-23 15:18:59 +0100
commit537c7e1137684c97676bbb74d59cd93c5bf1aad1 (patch)
treef92703b1b94c2b6231981a54d4ece5c6565dccbb /synapse/rest/register.py
parentMake sure the config actually /has/ a captcha_bypass_secret set before trying... (diff)
downloadsynapse-537c7e1137684c97676bbb74d59cd93c5bf1aad1.tar.xz
Config values are almost never 'None', but they might be empty string. Detect their presence by truth
Diffstat (limited to '')
-rw-r--r--synapse/rest/register.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/register.py b/synapse/rest/register.py
index 3b07a127a6..66cef26ada 100644
--- a/synapse/rest/register.py
+++ b/synapse/rest/register.py
@@ -153,7 +153,7 @@ class RegisterRestServlet(RestServlet):
     @defer.inlineCallbacks
     def _check_recaptcha(self, request, register_json):
         if "captcha_bypass_secret" in register_json:
-            if (self.hs.config.captcha_bypass_secret is not None and
+            if (self.hs.config.captcha_bypass_secret and
                     register_json["captcha_bypass_secret"] ==
                         self.hs.config.captcha_bypass_secret):
                 defer.returnValue(None)