Commit Graph

10321 Commits (4dc2eda1d34b142035e5cb2a93e27272dce84c03)

Author SHA1 Message Date
Brendan Abolivier 28803ad56a Merge branch 'dinsic' into babolivier/3pid-invite 2019-07-17 15:06:41 +02:00
Brendan Abolivier 34dd738e4b
There's no third_party_signed property in an invite's content 2019-07-17 15:03:23 +02:00
Brendan Abolivier 048f86ef5d
Fix check of the association between a 3PID invite and the subsequent m.room.member event in the 3rd party rules 2019-07-17 14:54:58 +02:00
Brendan Abolivier 3bc4ea841d
Merge pull request #5646 from matrix-org/babolivier/profile-allow-self
Port #5644 to dinsic
2019-07-09 13:19:57 +01:00
Brendan Abolivier 25fff95448 Allow newly-registered users to lookup their own profiles
When a user creates an account and the 'require_auth_for_profile_requests' config flag is set, and a client that performed the registration wants to lookup the newly-created profile, the request will be denied because the user doesn't share a room with themselves yet.
2019-07-09 10:27:53 +01:00
Brendan Abolivier 5fe0cea37e
Merge pull request #5610 from matrix-org/babolivier/power-levels
Implement new restrictions on power levels
2019-07-04 11:12:47 +01:00
Brendan Abolivier 95b5d4ad54 Merge branch 'babolivier/power-levels' of github.com:matrix-org/synapse into babolivier/power-levels 2019-07-03 18:30:13 +01:00
Brendan Abolivier 4dd7de17b7
Incorporate review 2019-07-03 18:26:48 +01:00
Brendan Abolivier 8b44097771
Update synapse/third_party_rules/access_rules.py
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2019-07-03 18:21:42 +01:00
Brendan Abolivier 6b83a1826c
Incorporate review 2019-07-03 17:32:52 +01:00
Brendan Abolivier d085e0df2a
Change the rule for applying PL restrictions 2019-07-03 15:44:22 +01:00
Brendan Abolivier aa3ba41933
Default return value for events we're not interested in 2019-07-03 12:05:56 +01:00
Brendan Abolivier 724ddaddb3
Refactor part of the access rules module
Since we're not processing only membership events and 3PID invites anymore, it's nice to know which function is supposed to process what.
2019-07-03 12:03:22 +01:00
Brendan Abolivier 8636ec042b
Implement restrictions for power levels 2019-07-03 11:45:07 +01:00
Brendan Abolivier a7a8bbf502
Only ratelimit when sending the email
If we do the opposite, an event can arrive after or while sending the email and the 3PID invite event will get ratelimited.
2019-06-28 17:47:38 +01:00
Brendan Abolivier 7c644198c8 Don't update the ratelimiter before sending a 3PID invite
This would cause emails being sent, but Synapse responding with a 429 when creating the event. The client would then retry, and with bad timing the same scenario would happen again. Some testing I did ended up sending me 10 emails for one single invite because of this.
2019-06-28 17:44:28 +01:00
Brendan Abolivier f370fd01ec
Merge pull request #5574 from matrix-org/babolivier/fix-3pid-bind
Fix new 3PID bindings being associated with rewritten IS's server names instead of the original one
2019-06-27 15:17:15 +01:00
Brendan Abolivier 1ef3627b05
Fix new 3PID bindings being associated with rewritten IS's server names instead of the original one
This would make unbind requests fail because Synapse is using the server name it has in DB as destination_is to generate signature, and Sydent uses its own server name there when verifying it, so if a mismatch happens, which is the case if the name gets rewritten for routing purposes, the unbind requests fail on the signature verification.
2019-06-27 14:53:10 +01:00
Brendan Abolivier 84875301b6 Split public rooms directory auth config in two 2019-06-24 16:41:48 +01:00
Brendan Abolivier 18f0b69c49
Merge pull request #5495 from matrix-org/babolivier/deactivate_bg_job_typo
Port "Fix typo in deactivation background job" to dinsic
2019-06-19 11:58:52 +01:00
Brendan Abolivier 4875746d82
Fix typo in deactivation background job 2019-06-19 11:39:18 +01:00
Brendan Abolivier 7157276124
Don't process 3PIDs in _apply_restricted 2019-06-18 17:43:34 +01:00
Brendan Abolivier cefc5542fb
Lint 2019-06-18 14:59:05 +01:00
Brendan Abolivier d36a876d2d
Incorporate review 2019-06-18 14:53:33 +01:00
Brendan Abolivier f7339d42ee
Fixes 2019-06-18 11:28:33 +01:00
Brendan Abolivier 8aea2c3be1 Docstrings 2019-06-17 20:24:36 +01:00
Brendan Abolivier 1cd0ecc1f2 Rename into RoomAccessRules 2019-06-17 20:24:30 +01:00
Brendan Abolivier 19a4298a51 Fix function call 2019-06-17 20:24:26 +01:00
Brendan Abolivier 073dd7778e Implement rules change 2019-06-17 20:24:22 +01:00
Brendan Abolivier 00736c8935 Improve doc 2019-06-17 20:24:16 +01:00
Brendan Abolivier 112a48a5aa Implement 3PID invite hook 2019-06-17 20:24:07 +01:00
Brendan Abolivier 53aff08ebe Implement restricted rules and room creation hook 2019-06-17 20:22:53 +01:00
Brendan Abolivier 8b2f655589 Implement rules for direct 2019-06-17 20:22:27 +01:00
Brendan Abolivier bd8448ccb2 Backbone 2019-06-17 20:19:12 +01:00
Brendan Abolivier 110608d1d6 Base 2019-06-17 20:19:08 +01:00
Brendan Abolivier 9bb7cec90f Make check_threepid_can_be_invited async 2019-06-17 18:10:00 +01:00
Brendan Abolivier 08d4534771 Add third party rules hook for 3PID invites 2019-06-17 18:10:00 +01:00
Erik Johnston fb1b76ff4c Add third party rules hook into create room 2019-06-17 15:48:57 +01:00
Brendan Abolivier 40ea934de0
Merge pull request #5471 from matrix-org/erikj/3pid_remote_invite_state
Port "Fix 3PID invite room state over federation" to dinsic
2019-06-17 11:43:02 +01:00
Brendan Abolivier 5c4296b47a Merge branch 'babolivier/third_party_event_rules' into dinsic 2019-06-14 19:38:44 +01:00
Brendan Abolivier 65d3652cb7 Fix background job for deactivated flag 2019-06-14 18:29:13 +01:00
Brendan Abolivier f874b16b2e Add plugin APIs for implementations of custom event rules. 2019-06-14 18:16:03 +01:00
Erik Johnston 304a1376c2 Fix 3PID invite room state over federation.
Fixes that when a user exchanges a 3PID invite for a proper invite over
federation it does not include the `invite_room_state` key.

This was due to synapse incorrectly sending out two invite requests.
2019-06-14 16:19:11 +01:00
Brendan Abolivier aded5cfb72 Don't send renewal emails to deactivated users 2019-06-14 15:39:18 +01:00
Brendan Abolivier 57bd5cfc9a Track deactivated accounts in the database (#5378) 2019-06-14 13:45:36 +01:00
Brendan Abolivier c4759cd041 Merge branch 'dinsic' into babolivier/userdir_hide_users 2019-06-14 10:37:43 +01:00
Brendan Abolivier 4dda68da9a
Make index unique 2019-06-14 10:37:12 +01:00
Brendan Abolivier adf3eee668 Merge branch 'babolivier/fix_profile_replication' into babolivier/userdir_hide_users 2019-06-13 18:11:11 +01:00
Brendan Abolivier 996cf15d42
Lint 2019-06-13 17:41:13 +01:00
Brendan Abolivier 27cd0b3037
Fix snafu 2019-06-13 17:40:14 +01:00