mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-22 03:24:58 -05:00
Merge pull request #448 from matrix-org/daniel/3pid
Strip address and such out of 3pid invites
This commit is contained in:
commit
10f82b4bea
@ -778,7 +778,7 @@ class Auth(object):
|
|||||||
if "third_party_invite" in event.content:
|
if "third_party_invite" in event.content:
|
||||||
key = (
|
key = (
|
||||||
EventTypes.ThirdPartyInvite,
|
EventTypes.ThirdPartyInvite,
|
||||||
event.content["third_party_invite"]["token"]
|
event.content["third_party_invite"]["signed"]["token"]
|
||||||
)
|
)
|
||||||
third_party_invite = current_state.get(key)
|
third_party_invite = current_state.get(key)
|
||||||
if third_party_invite:
|
if third_party_invite:
|
||||||
|
@ -1650,11 +1650,22 @@ class FederationHandler(BaseHandler):
|
|||||||
sender = invite["sender"]
|
sender = invite["sender"]
|
||||||
room_id = invite["room_id"]
|
room_id = invite["room_id"]
|
||||||
|
|
||||||
|
if "signed" not in invite:
|
||||||
|
logger.info(
|
||||||
|
"Discarding received notification of third party invite "
|
||||||
|
"without signed: %s" % (invite,)
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
third_party_invite = {
|
||||||
|
"signed": invite["signed"],
|
||||||
|
}
|
||||||
|
|
||||||
event_dict = {
|
event_dict = {
|
||||||
"type": EventTypes.Member,
|
"type": EventTypes.Member,
|
||||||
"content": {
|
"content": {
|
||||||
"membership": Membership.INVITE,
|
"membership": Membership.INVITE,
|
||||||
"third_party_invite": invite,
|
"third_party_invite": third_party_invite,
|
||||||
},
|
},
|
||||||
"room_id": room_id,
|
"room_id": room_id,
|
||||||
"sender": sender,
|
"sender": sender,
|
||||||
|
Loading…
Reference in New Issue
Block a user