summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-06-12 11:53:03 +0100
committerErik Johnston <erik@matrix.org>2015-06-12 11:53:03 +0100
commit405f8c47961c46aa225aa4b30f3774528929d9ed (patch)
treea266f69bc3147bf232595794bb6d36e024330ef9 /synapse/handlers/auth.py
parentMerge branch 'release-v0.9.1' of github.com:matrix-org/synapse (diff)
parentMention config option name (diff)
downloadsynapse-405f8c47961c46aa225aa4b30f3774528929d9ed.tar.xz
Merge branch 'release-v0.9.2' v0.9.2
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 4e2e50345e..63071653a3 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -187,8 +187,8 @@ class AuthHandler(BaseHandler):
         # each request
         try:
             client = SimpleHttpClient(self.hs)
-            data = yield client.post_urlencoded_get_json(
-                "https://www.google.com/recaptcha/api/siteverify",
+            resp_body = yield client.post_urlencoded_get_json(
+                self.hs.config.recaptcha_siteverify_api,
                 args={
                     'secret': self.hs.config.recaptcha_private_key,
                     'response': user_response,
@@ -198,7 +198,8 @@ class AuthHandler(BaseHandler):
         except PartialDownloadError as pde:
             # Twisted is silly
             data = pde.response
-        resp_body = simplejson.loads(data)
+            resp_body = simplejson.loads(data)
+
         if 'success' in resp_body and resp_body['success']:
             defer.returnValue(True)
         raise LoginError(401, "", errcode=Codes.UNAUTHORIZED)