mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Improve the error code when trying to register using a name reserved for guests. (#8135)
This commit is contained in:
parent
dbc630a628
commit
592cdf73be
1
changelog.d/8135.bugfix
Normal file
1
changelog.d/8135.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Clarify the error code if a user tries to register with a numeric ID. This bug was introduced in v1.15.0.
|
@ -124,7 +124,9 @@ class RegistrationHandler(BaseHandler):
|
|||||||
try:
|
try:
|
||||||
int(localpart)
|
int(localpart)
|
||||||
raise SynapseError(
|
raise SynapseError(
|
||||||
400, "Numeric user IDs are reserved for guest users."
|
400,
|
||||||
|
"Numeric user IDs are reserved for guest users.",
|
||||||
|
errcode=Codes.INVALID_USERNAME,
|
||||||
)
|
)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user