mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-01 11:04:18 -04:00
Modify register/available to be GET with query param
- GET is now the method for register/available - a query parameter "username" is now used Also, empty usernames are now handled with an error message on registration or via register/available: `User ID cannot be empty`
This commit is contained in:
parent
a3648f84b2
commit
369195caa5
2 changed files with 11 additions and 5 deletions
|
@ -54,6 +54,13 @@ class RegistrationHandler(BaseHandler):
|
|||
Codes.INVALID_USERNAME
|
||||
)
|
||||
|
||||
if len(localpart) == 0:
|
||||
raise SynapseError(
|
||||
400,
|
||||
"User ID cannot be empty",
|
||||
Codes.INVALID_USERNAME
|
||||
)
|
||||
|
||||
if localpart[0] == '_':
|
||||
raise SynapseError(
|
||||
400,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue