mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-17 23:29:12 -04:00
Add configs to make profile data more private (#9203)
Add off-by-default configuration settings to: - disable putting an invitee's profile info in invite events - disable profile lookup via federation Signed-off-by: Andrew Ferrazzutti <fair@miscworks.net>
This commit is contained in:
parent
84a7191410
commit
9bc74743d5
9 changed files with 66 additions and 7 deletions
|
@ -310,6 +310,16 @@ class ProfileHandler(BaseHandler):
|
|||
await self._update_join_states(requester, target_user)
|
||||
|
||||
async def on_profile_query(self, args: JsonDict) -> JsonDict:
|
||||
"""Handles federation profile query requests.
|
||||
"""
|
||||
|
||||
if not self.hs.config.allow_profile_lookup_over_federation:
|
||||
raise SynapseError(
|
||||
403,
|
||||
"Profile lookup over federation is disabled on this homeserver",
|
||||
Codes.FORBIDDEN,
|
||||
)
|
||||
|
||||
user = UserID.from_string(args["user_id"])
|
||||
if not self.hs.is_mine(user):
|
||||
raise SynapseError(400, "User is not hosted on this homeserver")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue