diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-07-09 10:25:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 10:25:40 +0100 |
commit | af67c7c1ded7f82ec7ba8400f1b071a1d47f9bfb (patch) | |
tree | 6edb546740e248500ffb3c274fad123de5651d95 /synapse | |
parent | Remove access-token support from RegistrationHandler.register (#5641) (diff) | |
parent | Lint (diff) | |
download | synapse-af67c7c1ded7f82ec7ba8400f1b071a1d47f9bfb.tar.xz |
Merge pull request #5644 from matrix-org/babolivier/profile-allow-self
Allow newly-registered users to lookup their own profiles
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/profile.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index d8462b75ec..a2388a7091 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -303,6 +303,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()) target_user_rooms = yield self.store.get_rooms_for_user( |