summary refs log tree commit diff
path: root/synapse/rest/register.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-05 22:55:29 -0700
committerKegan Dougal <kegan@matrix.org>2014-09-05 22:55:29 -0700
commit3ea6f01b4eff682c2770236cd7cee61a7bc61276 (patch)
tree8a3e5604790ec4084953ddd5d297310b92a57b97 /synapse/rest/register.py
parentAdd config opion for XFF headers when performing ReCaptcha auth. (diff)
downloadsynapse-3ea6f01b4eff682c2770236cd7cee61a7bc61276.tar.xz
80 chars please
Diffstat (limited to 'synapse/rest/register.py')
-rw-r--r--synapse/rest/register.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/register.py b/synapse/rest/register.py
index 5872a11d80..48d3c6eca0 100644
--- a/synapse/rest/register.py
+++ b/synapse/rest/register.py
@@ -58,11 +58,13 @@ class RegisterRestServlet(RestServlet):
             try:
                 captcha_type = register_json["captcha"]["type"]
                 if captcha_type != "m.login.recaptcha":
-                    raise SynapseError(400, "Sorry, only m.login.recaptcha requests are supported.")
+                    raise SynapseError(400, "Sorry, only m.login.recaptcha " +
+                                       "requests are supported.")
                 challenge = register_json["captcha"]["challenge"]
                 user_response = register_json["captcha"]["response"]
             except KeyError:
-                raise SynapseError(400, "Captcha response is required", errcode=Codes.CAPTCHA_NEEDED)
+                raise SynapseError(400, "Captcha response is required",
+                                   errcode=Codes.CAPTCHA_NEEDED)
             
             # TODO determine the source IP : May be an X-Forwarding-For header depending on config
             ip_addr = request.getClientIP()