mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Allow URL-encoded user IDs on user admin api paths (#6825)
This commit is contained in:
parent
b0d112e78b
commit
370080531e
2 changed files with 3 additions and 2 deletions
1
changelog.d/6825.bugfix
Normal file
1
changelog.d/6825.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Allow URL-encoded User IDs on `/_synapse/admin/v2/users/<user_id>[/admin]` endpoints. Thanks to @NHAS for reporting.
|
|
@ -105,7 +105,7 @@ class UsersRestServletV2(RestServlet):
|
||||||
|
|
||||||
|
|
||||||
class UserRestServletV2(RestServlet):
|
class UserRestServletV2(RestServlet):
|
||||||
PATTERNS = (re.compile("^/_synapse/admin/v2/users/(?P<user_id>@[^/]+)$"),)
|
PATTERNS = (re.compile("^/_synapse/admin/v2/users/(?P<user_id>[^/]+)$"),)
|
||||||
|
|
||||||
"""Get request to list user details.
|
"""Get request to list user details.
|
||||||
This needs user to have administrator access in Synapse.
|
This needs user to have administrator access in Synapse.
|
||||||
|
@ -568,7 +568,7 @@ class UserAdminServlet(RestServlet):
|
||||||
{}
|
{}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
PATTERNS = (re.compile("^/_synapse/admin/v1/users/(?P<user_id>@[^/]*)/admin$"),)
|
PATTERNS = (re.compile("^/_synapse/admin/v1/users/(?P<user_id>[^/]*)/admin$"),)
|
||||||
|
|
||||||
def __init__(self, hs):
|
def __init__(self, hs):
|
||||||
self.hs = hs
|
self.hs = hs
|
||||||
|
|
Loading…
Reference in a new issue