Skip to content
Snippets Groups Projects
Commit 18b7eb83 authored by Paul Evans's avatar Paul Evans Committed by GitHub
Browse files

Merge pull request #958 from matrix-org/paul/SYN-738

Forbid non-ASes from registering users whose names begin with '_'
parents cbea0c70 05f64473
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,13 @@ class RegistrationHandler(BaseHandler):
Codes.INVALID_USERNAME
)
if localpart[0] == '_':
raise SynapseError(
400,
"User ID may not begin with _",
Codes.INVALID_USERNAME
)
user = UserID(localpart, self.hs.hostname)
user_id = user.to_string()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment