summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:04:33 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-23 17:04:33 +0000
commitc3b7b10c4438910b58c988818eb1d1fe46318515 (patch)
tree64deffbd87b72ab440773debe6f063d79b4be3cd
parentFix `room_version` in `on_invite_request` flow (#6827) (diff)
parentAllow URL-encoded user IDs on user admin api paths (#6825) (diff)
downloadsynapse-c3b7b10c4438910b58c988818eb1d1fe46318515.tar.xz
Allow URL-encoded user IDs on user admin api paths (#6825)
* commit '370080531':
  Allow URL-encoded user IDs on user admin api paths (#6825)
-rw-r--r--changelog.d/6825.bugfix1
-rw-r--r--synapse/rest/admin/users.py4
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.d/6825.bugfix b/changelog.d/6825.bugfix
new file mode 100644

index 0000000000..d3cacd6d9a --- /dev/null +++ b/changelog.d/6825.bugfix
@@ -0,0 +1 @@ +Allow URL-encoded User IDs on `/_synapse/admin/v2/users/<user_id>[/admin]` endpoints. Thanks to @NHAS for reporting. \ No newline at end of file diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index 3455741195..f1c4434f5c 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py
@@ -105,7 +105,7 @@ class UsersRestServletV2(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. 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): self.hs = hs