diff options
author | Luke Barnard <lukebarnard1@users.noreply.github.com> | 2017-05-11 09:36:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-11 09:36:39 +0100 |
commit | c1935f0a41d35b5b766fc6af3924ed267cf287eb (patch) | |
tree | a40643ce61ac9bece8f6e6e95ec4451191df7e14 /synapse/handlers | |
parent | Merge pull request #2208 from matrix-org/erikj/ratelimit_overrid (diff) | |
parent | Modify condition on empty localpart (diff) | |
download | synapse-c1935f0a41d35b5b766fc6af3924ed267cf287eb.tar.xz |
Merge pull request #2213 from matrix-org/luke/username-availability-qp
Modify register/available to be GET with query param
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/register.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 03c6a85fc6..ee3a2269a8 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -54,6 +54,13 @@ class RegistrationHandler(BaseHandler): Codes.INVALID_USERNAME ) + if not localpart: + raise SynapseError( + 400, + "User ID cannot be empty", + Codes.INVALID_USERNAME + ) + if localpart[0] == '_': raise SynapseError( 400, |