diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-23 15:18:59 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-23 15:18:59 +0100 |
commit | 537c7e1137684c97676bbb74d59cd93c5bf1aad1 (patch) | |
tree | f92703b1b94c2b6231981a54d4ece5c6565dccbb | |
parent | Make sure the config actually /has/ a captcha_bypass_secret set before trying... (diff) | |
download | synapse-537c7e1137684c97676bbb74d59cd93c5bf1aad1.tar.xz |
Config values are almost never 'None', but they might be empty string. Detect their presence by truth
-rw-r--r-- | synapse/rest/register.py | 2 |
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) |