summary refs log tree commit diff
path: root/synapse/rest/client/v1/profile.py
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2019-12-12 13:51:25 +0000
committerGitHub <noreply@github.com>2019-12-12 13:51:25 +0000
commitf4d1ab0027968621c6e6f1c8cc8dfc3ab8cd4b59 (patch)
tree7c33bbc34925c4ff66fd1868836610055cf5a4ed /synapse/rest/client/v1/profile.py
parentAdd some flaky sytests to a sytest-blacklist (#17) (diff)
downloadsynapse-f4d1ab0027968621c6e6f1c8cc8dfc3ab8cd4b59.tar.xz
Add the ability to restrict max avatar filesize and content-type (#19)
Diffstat (limited to 'synapse/rest/client/v1/profile.py')
-rw-r--r--synapse/rest/client/v1/profile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/profile.py b/synapse/rest/client/v1/profile.py

index 064bcddaeb..34361697df 100644 --- a/synapse/rest/client/v1/profile.py +++ b/synapse/rest/client/v1/profile.py
@@ -134,12 +134,13 @@ class ProfileAvatarURLRestServlet(RestServlet): content = parse_json_object_from_request(request) try: - new_name = content["avatar_url"] + new_avatar_url = content["avatar_url"] except Exception: defer.returnValue((400, "Unable to parse name")) yield self.profile_handler.set_avatar_url( - user, requester, new_name, is_admin) + user, requester, new_avatar_url, is_admin + ) if self.hs.config.shadow_server: shadow_user = UserID(