summary refs log tree commit diff
path: root/synapse/handlers/profile.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-07-09 13:19:57 +0100
committerGitHub <noreply@github.com>2019-07-09 13:19:57 +0100
commit3bc4ea841d3d7e67e918736d98a9ad8d974bf9d6 (patch)
tree7bbc791a74f98961aa91aae6a4964cb654573100 /synapse/handlers/profile.py
parentMerge pull request #5610 from matrix-org/babolivier/power-levels (diff)
parentmake the base branch dinsic for dinsic (diff)
downloadsynapse-3bc4ea841d3d7e67e918736d98a9ad8d974bf9d6.tar.xz
Merge pull request #5646 from matrix-org/babolivier/profile-allow-self dinsic_2019-07-09
Port #5644 to dinsic
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r--synapse/handlers/profile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py

index 7bb0d654bf..5c493b8d63 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py
@@ -462,6 +462,10 @@ class BaseProfileHandler(BaseHandler): if not self.hs.config.require_auth_for_profile_requests or not requester: return + # Always allow the user to query their own profile. + if target_user.to_string() == requester.to_string(): + return + try: requester_rooms = yield self.store.get_rooms_for_user( requester.to_string()