Brendan Abolivier
eaec1d4ce7
Incorporate review
2019-10-04 12:10:20 +01:00
Brendan Abolivier
d694546453
Lint (again)
2019-10-04 12:10:19 +01:00
Brendan Abolivier
06159a0ee7
Lint
2019-10-04 12:10:19 +01:00
Brendan Abolivier
a6a55039a4
Add test case
2019-10-04 12:10:19 +01:00
Brendan Abolivier
1a01ca0774
Changelog
2019-10-04 12:10:19 +01:00
Brendan Abolivier
78d9b4a6e6
Lint
2019-10-04 12:10:19 +01:00
Brendan Abolivier
dfcf4ba406
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-04 12:10:14 +01:00
Brendan Abolivier
cd858afea6
Merge pull request #7 from matrix-org/babolivier/deactivation-invite
...
Reject pending invites on deactivation
2019-09-27 17:52:41 +01:00
Brendan Abolivier
ce2448efbe
Fix git messing up
2019-09-27 17:18:10 +01:00
Brendan Abolivier
04b779a6ac
s/return/defer.returnValue/
2019-09-27 17:06:12 +01:00
Brendan Abolivier
42409b3022
Incorporate review
2019-09-27 17:03:34 +01:00
Brendan Abolivier
5a207c1113
Update synapse/handlers/deactivate_account.py
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-09-27 17:03:34 +01:00
Brendan Abolivier
0ae6c8efc1
Update synapse/handlers/deactivate_account.py
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-09-27 17:03:34 +01:00
Brendan Abolivier
318fed18da
Update changelog.d/6125.feature
...
Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com >
2019-09-27 17:03:10 +01:00
Brendan Abolivier
97672c03e2
ok
2019-09-27 16:57:19 +01:00
Brendan Abolivier
acf6b2388e
Lint
2019-09-27 16:57:19 +01:00
Brendan Abolivier
4c6d9408d3
Merge pull request #6 from matrix-org/babolivier/access-rules-membership
...
Allow membership events which membership isn't join or invite in restricted rooms
2019-09-26 12:07:54 +01:00
Brendan Abolivier
0d069e4407
Changelog
2019-09-26 11:15:49 +01:00
Brendan Abolivier
e6a7f8964f
Allow membership events which membership isn't join or invite in restricted rooms
2019-09-26 11:12:21 +01:00
Michael Kaye
efaf8038e2
Merge pull request #5 from matrix-org/babolivier/get-retention-worker
...
Fix room retention policy management in worker mode
2019-09-25 12:43:46 +01:00
Brendan Abolivier
f3dfbc82d5
Typo
2019-09-24 17:25:13 +01:00
Brendan Abolivier
25815841b1
Consider every room as having no retention policy if the feature is disabled
2019-09-24 17:24:28 +01:00
Brendan Abolivier
32bc69d0f5
Changelog
2019-09-24 17:19:59 +01:00
Brendan Abolivier
af597b1eb6
Move get_retention_policy_for_room to RoomWorkerStore
2019-09-24 17:19:59 +01:00
Brendan Abolivier
07eb311b11
Merge pull request #4 from matrix-org/babolivier/strip_invalid_mxid_characters
...
Fix handling of filtered strings in Python 3 when processing MXIDs
2019-09-20 10:57:07 +01:00
Brendan Abolivier
736394d46b
Remove unnecessary cast to list
2019-09-20 10:07:55 +01:00
Brendan Abolivier
6f364634ee
Changelog
2019-09-19 13:02:23 +01:00
Brendan Abolivier
8bc39401fe
Lint
2019-09-19 13:01:05 +01:00
Brendan Abolivier
30c085fbc3
Use six.moves.filter when filtering out from MXID
...
Python 2's filter() function and Python 3's don't return the same type when processing a string (respectively str and filter), therefore use six's compatibility mapping (which resolves to itertools.ifilter() if using Python2), then generate a string from the filtered list, in order to ensure consistent behaviour between Python 2 and Python 3.
2019-09-19 12:03:10 +01:00
Brendan Abolivier
ae036ed636
Add unit tests for strip_invalid_mxid_characters
2019-09-19 11:58:06 +01:00
Brendan Abolivier
27b982269e
Merge pull request #2 from matrix-org/babolivier/dinsic-3pid-invite
...
Don't treat 3PID revocation as a new 3PID invite
2019-09-10 11:32:31 +01:00
Brendan Abolivier
0b993427e1
Update changelog.d/2.bugfix
...
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2019-09-10 10:18:37 +01:00
Brendan Abolivier
66be293c79
Process revocations in _on_membership_or_invite_direct
2019-09-09 17:52:41 +01:00
Brendan Abolivier
43c1a10e91
Merge pull request #3 from matrix-org/babolivier/password-reset-template-unicode
...
Ensure the password reset template is correctly converted to binary
2019-09-09 17:52:05 +01:00
Brendan Abolivier
c8f03a8fb0
Rename io.open import to limite side-effects
2019-09-09 17:13:37 +01:00
Brendan Abolivier
b0eec085bd
Lint
2019-09-09 16:41:46 +01:00
Brendan Abolivier
76f70779f1
Revert "Merge pull request #5932 from matrix-org/babolivier/account_validity_template_encode"
...
This reverts commit 84e695f506 , reversing
changes made to 99eec6d2d5 .
2019-09-09 16:36:00 +01:00
Brendan Abolivier
21a6f0b12c
Read all files as UTF-8
2019-09-09 16:34:47 +01:00
Brendan Abolivier
6ceaf90e13
Revert "Ensure the password reset template is correctly converted to binary"
...
This reverts commit 665dd9f7f8 .
2019-09-09 16:33:09 +01:00
Brendan Abolivier
a8c7c26e7d
Changelog
2019-09-09 11:49:42 +01:00
Brendan Abolivier
665dd9f7f8
Ensure the password reset template is correctly converted to binary
...
Regardless of the Python version
2019-09-09 11:35:56 +01:00
Brendan Abolivier
5076c2ebf6
Typo
2019-09-06 17:48:42 +01:00
Brendan Abolivier
6a78a0ce9b
Lint
2019-09-06 15:51:52 +01:00
Brendan Abolivier
160a0c767d
Changelog
2019-09-06 15:51:30 +01:00
Brendan Abolivier
e1c4d2c8ba
Only filter on 3PID invite tokens
2019-09-06 15:48:02 +01:00
Brendan Abolivier
e35c30ed4b
Fix bogus conflict resolution
2019-09-06 15:44:48 +01:00
Brendan Abolivier
e163df4c20
Merge branch 'dinsic' into babolivier/dinsic-3pid-invite
2019-09-06 15:41:37 +01:00
Brendan Abolivier
b2ec4467c9
Don't process revoked/redacted events as part of the room's membership info
2019-09-06 15:36:43 +01:00
Brendan Abolivier
b15557cd46
Don't treat 3PID revokation as a new 3PID invite
2019-09-06 15:32:11 +01:00
Brendan Abolivier
e9f2925292
Merge pull request #1 from matrix-org/babolivier/direct-avatar-name
...
Forbid changing the name, avatar or topic of a direct room
2019-09-06 11:46:17 +01:00