mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-27 12:42:39 +00:00
Allow URL-encoded user IDs on user admin api paths (#6825)
This commit is contained in:
parent
b0d112e78b
commit
370080531e
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 New Issue
Block a user