summary refs log tree commit diff
path: root/synapse/handlers/login.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-11-20 17:41:56 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 17:41:56 +0000
commite377d3365293a25a9f4d38706da60f2c221fdf89 (patch)
treee20adc94d762f36500b93a655b19e4fb8852747a /synapse/handlers/login.py
parentOops, I removed this param. (diff)
downloadsynapse-e377d3365293a25a9f4d38706da60f2c221fdf89.tar.xz
Separate out the matrix http client completely because just about all of its code it now separate from the simple case we need for standard HTTP(S)
Diffstat (limited to '')
-rw-r--r--synapse/handlers/login.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/login.py b/synapse/handlers/login.py
index 1204dc3b8f..979086a3d6 100644
--- a/synapse/handlers/login.py
+++ b/synapse/handlers/login.py
@@ -99,8 +99,12 @@ class LoginHandler(BaseHandler):
     def _query_email(self, email):
         httpCli = SimpleHttpClient(self.hs)
         data = yield httpCli.get_json(
-            'matrix.org:8090',  # TODO FIXME This should be configurable.
-            "/_matrix/identity/api/v1/lookup?medium=email&address=" +
-            "%s" % urllib.quote(email)
+            # TODO FIXME This should be configurable.
+            # XXX: ID servers need to use HTTPS
+            "http://%s%s" % ("matrix.org:8090", "/_matrix/identity/api/v1/lookup"),
+            {
+                'medium': 'email',
+                'address': email
+            }
         )
         defer.returnValue(data)