synapse/synapse/handlers
Brendan Abolivier 5705ecaec6
Don't 500 code when trying to exchange a revoked 3PID invite
While this is not documented in the spec (but should be), Riot (and other clients) revoke 3PID invites by sending a m.room.third_party_invite event with an empty ({}) content to the room's state.
When the invited 3PID gets associated with a MXID, the identity server (which doesn't know about revocations) sends down to the MXID's homeserver all of the undelivered invites it has for this 3PID. The homeserver then tries to talk to the inviting homeserver in order to exchange these invite for m.room.member events.
When one of the invite is revoked, the inviting homeserver responds with a 500 error because it tries to extract a 'display_name' property from the content, which is empty. This might cause the invited server to consider that the server is down and not try to exchange other, valid invites (or at least delay it).

This fix handles the case of revoked invites by avoiding trying to fetch a 'display_name' from the original invite's content, and letting the m.room.member event fail the auth rules (because, since the original invite's content is empty, it doesn't have public keys), which results in sending a 403 with the correct error message to the invited server.
2019-10-02 11:19:43 +01:00
..
ui_auth Threepid validity checks on msisdns should not be dependent on 'threepid_behaviour_email'. (#6104) 2019-09-25 12:29:35 +01:00
__init__.py Fix registration on workers (#4682) 2019-02-20 18:47:31 +11:00
_base.py Fix comments 2019-09-11 13:54:50 +01:00
account_data.py Remove unnecessary parentheses around return statements (#5931) 2019-08-30 16:28:26 +01:00
account_validity.py Allow Synapse to send registration emails + choose Synapse or an external server to handle 3pid validation (#5987) 2019-09-06 11:35:28 +01:00
acme.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
acme_issuing_service.py Allow configuration of the path used for ACME account keys. 2019-06-24 13:51:22 +01:00
admin.py Add GET method to admin API /users/@user:dom/admin 2019-08-27 13:12:27 +01:00
appservice.py Remove double return statements (#5962) 2019-09-03 11:42:45 +01:00
auth.py Stop advertising unsupported flows for registration (#6107) 2019-09-25 12:10:26 +01:00
deactivate_account.py Incorporate review 2019-09-27 16:15:01 +01:00
device.py Opentrace device lists (#5853) 2019-09-03 10:21:30 +01:00
devicemessage.py Link the send loop with the edus contexts 2019-09-05 14:42:37 +01:00
directory.py Remove duplicate return statement 2019-07-31 13:24:51 +01:00
e2e_keys.py Opentrace e2e keys (#5855) 2019-08-22 11:28:12 +01:00
e2e_room_keys.py Opentrace e2e keys (#5855) 2019-08-22 11:28:12 +01:00
events.py Remove double return statements (#5962) 2019-09-03 11:42:45 +01:00
federation.py Don't 500 code when trying to exchange a revoked 3PID invite 2019-10-02 11:19:43 +01:00
groups_local.py Correctly handle errors doing requests to group servers 2019-07-29 17:21:57 +01:00
identity.py Move lookup-related functions from RoomMemberHandler to IdentityHandler (#5978) 2019-09-27 10:36:20 +01:00
initial_sync.py Remove double return statements (#5962) 2019-09-03 11:42:45 +01:00
message.py Fix dummy event insertion consent bug (#6053) 2019-09-26 11:47:53 +01:00
pagination.py Servlet to purge old rooms (#5845) 2019-08-22 10:42:59 +01:00
presence.py fix typo 2019-09-03 12:44:14 +01:00
profile.py Increase max display name limit 2019-08-24 22:33:43 +01:00
read_marker.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
receipts.py Remove unnecessary parentheses around return statements (#5931) 2019-08-30 16:28:26 +01:00
register.py Only count real users when checking for auto-creation of auto-join room 2019-09-09 14:48:08 +03:00
room.py Use the v2 Identity Service API for lookups (MSC2134 + MSC2140) (#5976) 2019-09-11 16:02:42 +01:00
room_list.py Support MSC2197 outbound with unstable prefix 2019-08-15 10:59:37 +01:00
room_member.py Move lookup-related functions from RoomMemberHandler to IdentityHandler (#5978) 2019-09-27 10:36:20 +01:00
room_member_worker.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
saml_handler.py More better logging 2019-09-20 11:20:02 +01:00
search.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
set_password.py Added possibilty to disable local password authentication (#5092) 2019-06-27 18:37:29 +01:00
state_deltas.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00
stats.py Fix race condition in room stats. (#6029) 2019-09-17 12:41:23 +01:00
sync.py Remove double return statements (#5962) 2019-09-03 11:42:45 +01:00
typing.py Remove unnecessary parentheses around return statements (#5931) 2019-08-30 16:28:26 +01:00
user_directory.py Replace returnValue with return (#5736) 2019-07-23 23:00:55 +10:00