summary refs log tree commit diff
path: root/synapse/handlers (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | make FederationHandler._check_for_soft_fail asyncRichard van der Hoff2020-02-031-13/+9
| | | |
| | * | make FederationHandler._persist_auth_tree asyncRichard van der Hoff2020-02-031-11/+7
| | | |
| | * | make FederationHandler.do_invite_join asyncRichard van der Hoff2020-02-032-18/+18
| | | |
| | * | make FederationHandler.on_event_auth asyncRichard van der Hoff2020-02-031-5/+4
| | | |
| | * | make FederationHandler.on_exchange_third_party_invite_request asyncRichard van der Hoff2020-02-031-14/+12
| | | |
| | * | make FederationHandler.construct_auth_difference asyncRichard van der Hoff2020-02-031-3/+4
| | | |
| | * | make FederationHandler._update_context_for_auth_events asyncRichard van der Hoff2020-02-031-10/+10
| | | |
| | * | make FederationHandler._update_auth_events_and_context_for_auth asyncRichard van der Hoff2020-02-031-20/+21
| | | |
| | * | make FederationHandler.do_auth asyncRichard van der Hoff2020-02-031-10/+14
| | | |
| | * | make FederationHandler._prep_event asyncRichard van der Hoff2020-02-031-23/+10
| | | |
| | * | make FederationHandler._handle_new_event asyncRichard van der Hoff2020-02-031-6/+7
| | | |
| | * | make FederationHandler._handle_new_events asyncRichard van der Hoff2020-02-031-8/+6
| | | |
| | * | make FederationHandler.on_make_leave_request asyncRichard van der Hoff2020-02-031-13/+10
| | | |
| | * | make FederationHandler.on_send_leave_request asyncRichard van der Hoff2020-02-031-5/+3
| | | |
| | * | make FederationHandler.on_make_join_request asyncRichard van der Hoff2020-02-031-13/+10
| | | |
| | * | make FederationHandler.on_invite_request asyncRichard van der Hoff2020-02-031-5/+4
| | | |
| | * | make FederationHandler.on_send_join_request asyncRichard van der Hoff2020-02-031-9/+7
| | | |
| | * | make FederationHandler.on_query_auth asyncRichard van der Hoff2020-02-031-7/+6
| | |/
* | | Add typing to SyncHandler (#6821)Andrew Morgan2020-03-231-341/+364
|\| | | | | | | | | | | | | | * commit 'b9391c957': Add typing to SyncHandler (#6821)
| * | Add typing to SyncHandler (#6821)Erik Johnston2020-02-031-341/+364
| |/ | | | | | | Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* | pass room_version into compute_event_signature (#6807)Andrew Morgan2020-03-231-1/+4
|\| | | | | | | | | * commit '7f93eb190': pass room_version into compute_event_signature (#6807)
| * pass room_version into compute_event_signature (#6807)Richard van der Hoff2020-01-311-1/+4
| |
* | Merge pull request #6820 from matrix-org/rav/get_room_version_idAndrew Morgan2020-03-234-14/+16
|\| | | | | | | | | | | | | * commit '160522e32': newsfile Add `get_room_version` method s/get_room_version/get_room_version_id/
| * Merge pull request #6820 from matrix-org/rav/get_room_version_idRichard van der Hoff2020-01-314-14/+16
| |\ | | | | | | Make `get_room_version` return a RoomVersion object
| | * s/get_room_version/get_room_version_id/Richard van der Hoff2020-01-314-14/+16
| | | | | | | | | | | | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object.
* | | Fix bug with getting missing auth event during join 500'ed (#6810)Andrew Morgan2020-03-231-1/+5
|\| | | | | | | | | | | | | | * commit '7d846e870': Fix bug with getting missing auth event during join 500'ed (#6810)
| * | Fix bug with getting missing auth event during join 500'ed (#6810)Erik Johnston2020-01-311-1/+5
| |/
* | pass room version into FederationHandler.on_invite_request (#6805)Andrew Morgan2020-03-231-3/+3
|\| | | | | | | | | * commit '46a446828': pass room version into FederationHandler.on_invite_request (#6805)
| * pass room version into FederationHandler.on_invite_request (#6805)Richard van der Hoff2020-01-301-3/+3
| |
* | Resync remote device list when detected as stale. (#6786)Andrew Morgan2020-03-232-4/+24
|\| | | | | | | | | * commit 'b66032705': Resync remote device list when detected as stale. (#6786)
| * Resync remote device list when detected as stale. (#6786)Erik Johnston2020-01-302-4/+24
| |
* | Merge pull request #6790 from matrix-org/rav/msc2260.1Andrew Morgan2020-03-232-15/+32
|\| | | | | | | | | | | | | | | * commit '281551f72': changelog Make /directory/room/<alias> handle restrictive power levels Set the PL for aliases events to 0. Factor out a `copy_power_levels_contents` method
| * Make /directory/room/<alias> handle restrictive power levelsRichard van der Hoff2020-01-291-1/+6
| | | | | | | | | | Fixes a bug where the alias would be added, but `PUT /directory/room/<alias>` would return a 403.
| * Set the PL for aliases events to 0.Richard van der Hoff2020-01-291-2/+15
| |
| * Factor out a `copy_power_levels_contents` methodRichard van der Hoff2020-01-291-12/+11
| | | | | | | | I'm going to need another copy (hah!) of this.
* | Fix bug when querying remote user keys that require a resync. (#6796)Andrew Morgan2020-03-231-1/+2
|\| | | | | | | | | * commit '2cad8baa7': Fix bug when querying remote user keys that require a resync. (#6796)
| * Fix bug when querying remote user keys that require a resync. (#6796)Erik Johnston2020-01-291-1/+2
| | | | | | | | We ended up only returning a single device, rather than all of them.
* | Detect unknown remote devices and mark cache as stale (#6776)Andrew Morgan2020-03-232-2/+75
|\| | | | | | | | | * commit 'e17a11066': Detect unknown remote devices and mark cache as stale (#6776)
| * Detect unknown remote devices and mark cache as stale (#6776)Erik Johnston2020-01-282-2/+75
| | | | | | | | We just mark the fact that the cache may be stale in the database for now.
* | Pass room version object into event_auth.check and check_redaction (#6788)Andrew Morgan2020-03-232-9/+17
|\| | | | | | | | | * commit 'a8ce7aeb4': Pass room version object into event_auth.check and check_redaction (#6788)
| * Pass room version object into event_auth.check and check_redaction (#6788)Richard van der Hoff2020-01-282-9/+17
| | | | | | | | | | | | | | These are easier to work with than the strings and we normally have one around. This fixes `FederationHander._persist_auth_tree` which was passing a RoomVersion object into event_auth.check instead of a string.
* | Add `rooms.room_version` column (#6729)Andrew Morgan2020-03-232-35/+82
|\| | | | | | | | | * commit '8df862e45': Add `rooms.room_version` column (#6729)
| * Add `rooms.room_version` column (#6729)Erik Johnston2020-01-272-35/+82
| | | | | | This is so that we don't have to rely on pulling it out from `current_state_events` table.
* | Validate client_secret parameter (#6767)Andrew Morgan2020-03-231-1/+3
|\| | | | | | | | | * commit '9f7aaf90b': Validate client_secret parameter (#6767)
| * Validate client_secret parameter (#6767)Andrew Morgan2020-01-241-1/+3
| |
* | Remove unnecessary abstractions in admin handler (#6751)Andrew Morgan2020-03-231-62/+0
|\| | | | | | | | | | | | | | | * commit 'ce84dd9e2': Remove unnecessary abstractions in admin handler (#6751) Fixup warning about workers changes Add deprecation headers Fixup changelog
| * Remove unnecessary abstractions in admin handler (#6751)Andrew Morgan2020-01-221-62/+0
| |
* | Add more logging around message retention policies support (#6717)Andrew Morgan2020-03-231-0/+13
|\| | | | | | | | | | | | | * commit 'a17f64361': Add more logging around message retention policies support (#6717) Fix up changelog bump version to v1.9.0.dev2
| * Add more logging around message retention policies support (#6717)Brendan Abolivier2020-01-171-0/+13
| | | | | | So we can debug issues like #6683 more easily
* | Merge pull request #6714 from matrix-org/babolivier/retention_select_eventAndrew Morgan2020-03-231-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3b72bb780': bump version to v1.9.0.dev1 Precise changelog Fixup diff Remove get_room_event_after_stream_ordering entirely Lint Rename changelog Changelog Correctly order when selecting before stream ordering Fix typo Fix instantiation of message retention purge jobs
| * Merge pull request #6714 from matrix-org/babolivier/retention_select_eventBrendan Abolivier2020-01-171-1/+1
| |\ | | | | | | Fix instantiation of message retention purge jobs
| | * Fix instantiation of message retention purge jobsBrendan Abolivier2020-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When figuring out which topological token to start a purge job at, we need to do the following: 1. Figure out a timestamp before which events will be purged 2. Select the first stream ordering after that timestamp 3. Select info about the first event after that stream ordering 4. Build a topological token from that info In some situations (e.g. quiet rooms with a short max_lifetime), there might not be an event after the stream ordering at step 3, therefore we abort the purge with the error `No event found`. To mitigate that, this patch fetches the first event _before_ the stream ordering, instead of after.
* | | Merge pull request #6724 from matrix-org/rav/log_saml_attributesAndrew Morgan2020-03-231-1/+12
|\| | | | | | | | | | | | | | | | | | | | * commit '59dc87c61': changelog Log saml assertions rather than the whole response move batch_iter to a separate module
| * | Merge pull request #6724 from matrix-org/rav/log_saml_attributesRichard van der Hoff2020-01-171-1/+12
| |\ \ | | | | | | | | Log saml assertions rather than the whole response
| | * | Log saml assertions rather than the whole responseRichard van der Hoff2020-01-161-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | ... since the whole response is huge. We even need to break up the assertions, since kibana otherwise truncates them.
* | | | Delegate remote_user_id mapping to the saml mapping provider (#6723)Andrew Morgan2020-03-231-6/+21
|\| | | | | | | | | | | | | | | | | | | * commit '2b6a77fcd': Delegate remote_user_id mapping to the saml mapping provider (#6723)
| * | | Delegate remote_user_id mapping to the saml mapping provider (#6723)Richard van der Hoff2020-01-171-6/+21
| |/ / | | | | | | Turns out that figuring out a remote user id for the SAML user isn't quite as obvious as it seems. Factor it out to the SamlMappingProvider so that it's easy to control.
* | | Add StateMap type alias (#6715)Andrew Morgan2020-03-233-28/+31
|\| | | | | | | | | | | | | | * commit 'd386f2f33': Add StateMap type alias (#6715)
| * | Add StateMap type alias (#6715)Erik Johnston2020-01-163-28/+31
| | |
* | | Port synapse.replication.tcp to async/await (#6666)Andrew Morgan2020-03-231-1/+1
|\| | | | | | | | | | | | | | * commit '48c3a9688': Port synapse.replication.tcp to async/await (#6666)
| * | Port synapse.replication.tcp to async/await (#6666)Erik Johnston2020-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Port synapse.replication.tcp to async/await * Newsfile * Correctly document type of on_<FOO> functions as async * Don't be overenthusiastic with the asyncing....
* | | Add `local_current_membership` table (#6655)Andrew Morgan2020-03-236-6/+6
|\| | | | | | | | | | | | | | * commit '28c98e51f': Add `local_current_membership` table (#6655)
| * | Add `local_current_membership` table (#6655)Erik Johnston2020-01-156-6/+6
| |/ | | | | | | | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* | Kill off RegistrationError (#6691)Andrew Morgan2020-03-231-9/+3
|\| | | | | | | | | * commit '326c893d2': Kill off RegistrationError (#6691)
| * Kill off RegistrationError (#6691)Richard van der Hoff2020-01-131-9/+3
| | | | | | This is pretty pointless. Let's just use SynapseError.
* | Don't assign numeric IDs for empty usernames (#6690)Andrew Morgan2020-03-231-1/+1
|\| | | | | | | | | * commit '2d07c7377': Don't assign numeric IDs for empty usernames (#6690)
| * Don't assign numeric IDs for empty usernames (#6690)Richard van der Hoff2020-01-131-1/+1
| | | | | | | | Fix a bug where we would assign a numeric userid if somebody tried registering with an empty username
* | Merge pull request #6689 from matrix-org/rav/saml_mapping_provider_updatesAndrew Morgan2020-03-231-6/+16
|\| | | | | | | | | | | | | * commit '3cfac9593': changelog Pass client redirect URL into SAML mapping providers Pass the module_api into the SamlMappingProvider
| * Pass client redirect URL into SAML mapping providersRichard van der Hoff2020-01-121-4/+11
| |
| * Pass the module_api into the SamlMappingProviderRichard van der Hoff2020-01-121-2/+5
| | | | | | | | | | ... for consistency with other modules, and because we'll need it sooner or later and it will be a pain to introduce later.
* | Allow admin users to create or modify users without a shared secret (#6495)Andrew Morgan2020-03-231-0/+9
|\| | | | | | | | | | | * commit 'd2906fe66': Allow admin users to create or modify users without a shared secret (#6495) Fixup changelog
| * Allow admin users to create or modify users without a shared secret (#6495)Manuel Stahl2020-01-091-0/+9
| | | | | | Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
* | Correctly proxy remote group HTTP errors. (#6654)Andrew Morgan2020-03-201-0/+16
|\| | | | | | | | | * commit 'be29ed7ad': Correctly proxy remote group HTTP errors. (#6654)
| * Correctly proxy remote group HTTP errors. (#6654)Erik Johnston2020-01-071-0/+16
| | | | | | | | | | e.g. if remote returns a 404 then that shouldn't be treated as an error but should be proxied through.
* | Merge pull request #6652 from matrix-org/babolivier/depth_missing_eventsAndrew Morgan2020-03-201-2/+2
|\| | | | | | | | | | | * commit '0ab5853ec': Changelog Fix conditions failing if min_depth = 0
| * Merge pull request #6652 from matrix-org/babolivier/depth_missing_eventsBrendan Abolivier2020-01-071-2/+2
| |\ | | | | | | Fix conditions failing if min_depth = 0
| | * Fix conditions failing if min_depth = 0Brendan Abolivier2020-01-071-2/+2
| | | | | | | | | | | | This could result in Synapse not fetching prev_events for new events in the room if it has missed some events.
* | | Merge pull request #6629 from matrix-org/rav/kill_event_reference_hashesAndrew Morgan2020-03-202-34/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1807db5e7': changelog Remove unused get_latest_event_ids_and_hashes_in_room Remove unused get_prev_events_and_hashes_for_room Remove unused hashes and depths from _update_membership params Remove unused hashes and depths from create_event params Remove unused hashes and depths from create_new_client_event params replace get_prev_events_and_hashes_for_room with get_prev_events_for_room in create_new_client_event rename get_prev_events_for_room to get_prev_events_and_hashes_for_room
| * | Merge pull request #6629 from matrix-org/rav/kill_event_reference_hashesRichard van der Hoff2020-01-062-34/+20
| |\ \ | | | | | | | | Remove a bunch of unused code from event creation
| | * | Remove unused hashes and depths from _update_membership paramsRichard van der Hoff2020-01-061-13/+4
| | | |
| | * | Remove unused hashes and depths from create_event paramsRichard van der Hoff2020-01-062-17/+12
| | | |
| | * | Remove unused hashes and depths from create_new_client_event paramsRichard van der Hoff2020-01-061-12/+14
| | | |
| | * | replace get_prev_events_and_hashes_for_room with get_prev_events_for_room in ↵Richard van der Hoff2020-01-061-9/+3
| | | | | | | | | | | | | | | | create_new_client_event
| | * | rename get_prev_events_for_room to get_prev_events_and_hashes_for_roomRichard van der Hoff2020-01-062-3/+7
| | | | | | | | | | | | | | | | ... to make way for a new method which just returns the event ids
* | | | Fix some test failures when frozen_dicts are enabled (#6642)Andrew Morgan2020-03-202-6/+11
|\| | | | | | | | | | | | | | | | | | | * commit 'ba897a759': Fix some test failures when frozen_dicts are enabled (#6642)
| * | | Fix some test failures when frozen_dicts are enabled (#6642)Richard van der Hoff2020-01-062-6/+11
| | | | | | | | | | | | | | | | Fixes #4026
* | | | Fix an error which was thrown by the PresenceHandler _on_shutdown handler. ↵Andrew Morgan2020-03-201-7/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | (#6640) * commit 'ab4b4ee6a': Fix an error which was thrown by the PresenceHandler _on_shutdown handler. (#6640)
| * | | Fix an error which was thrown by the PresenceHandler _on_shutdown handler. ↵Richard van der Hoff2020-01-061-7/+2
| |/ / | | | | | | | | | (#6640)
* | | Fix power levels being incorrectly set in old and new rooms after a room ↵Andrew Morgan2020-03-201-7/+10
|\| | | | | | | | | | | | | | | | | | | | upgrade (#6633) * commit '01c3c6c92': Fix power levels being incorrectly set in old and new rooms after a room upgrade (#6633)
| * | Fix power levels being incorrectly set in old and new rooms after a room ↵Andrew Morgan2020-01-061-7/+10
| |/ | | | | | | | | | | upgrade (#6633) Modify a copy of an upgraded room's PL before sending to the new room
| * Merge branch 'master' into developRichard van der Hoff2019-12-201-1/+4
| |\
* | | Fix small extra argument passed to get_eventsAndrew Morgan2020-03-201-2/+9
| | |
* | | Change EventContext to use the Storage class (#6564)Andrew Morgan2020-03-205-16/+16
|\| | | | | | | | | | | | | | * commit 'fa780e972': Change EventContext to use the Storage class (#6564)
| * | Change EventContext to use the Storage class (#6564)Erik Johnston2019-12-205-16/+16
| | |
* | | Fix exceptions when attempting to backfill (#6576)Andrew Morgan2020-03-202-2/+5
|\ \ \ | | |/ | |/| | | | | | | * commit '03d3792f3': Fix exceptions when attempting to backfill (#6576)
| * | Fix exceptions when attempting to backfill (#6576)Richard van der Hoff2019-12-201-1/+4
| | | | | | | | | Fixes #6575
* | | Port some admin handlers to async/await (#6559)Andrew Morgan2020-03-202-54/+41
|\ \ \ | | |/ | |/| | | | | | | * commit '3d46124ad': Port some admin handlers to async/await (#6559)
| * | Port some admin handlers to async/await (#6559)Erik Johnston2019-12-192-54/+41
| | |
* | | Add database config class (#6513)Andrew Morgan2020-03-202-36/+34
|\| | | | | | | | | | | | | | | | | * commit '2284eb3a5': Add database config class (#6513) too many parens
| * | Add database config class (#6513)Erik Johnston2019-12-181-1/+1
| | | | | | | | | | | | | | | This encapsulates config for a given database and is the way to get new connections.
| * | Merge release-v1.7.1 into developRichard van der Hoff2019-12-182-2/+6
| |\|
* | | Remove unused `get_pagination_rows` methods. (#6557)Andrew Morgan2020-03-193-18/+0
|\| | | | | | | | | | | | | | * commit '02553901c': Remove unused `get_pagination_rows` methods. (#6557)
| * | Remove unused `get_pagination_rows` methods. (#6557)Erik Johnston2019-12-173-18/+0
| | | | | | | | | Remove unused get_pagination_rows methods
* | | Merge pull request #6553 from matrix-org/babolivier/fix-context-filterAndrew Morgan2020-03-191-2/+5
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * commit '631653036': Incorporate review Update changelog.d/6553.bugfix Lint Add test case Changelog Update the documentation of the filtering function Use the filtered version of an event when responding to /context requests for that event
| * | Merge pull request #6553 from matrix-org/babolivier/fix-context-filterBrendan Abolivier2019-12-161-2/+5
| |\ \ | | | | | | | | Use the filtered version of an event when responding to /context requests for that event
| | * | Incorporate reviewBrendan Abolivier2019-12-161-1/+1
| | | |
| | * | Use the filtered version of an event when responding to /context requests ↵Brendan Abolivier2019-12-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | for that event Sometimes the filtering function can return a pruned version of an event (on top of either the event itself or an empty list), if it thinks the user should be able to see that there's an event there but not the content of that event. Therefore, the previous logic of 'if filtered is empty then we can use the event we retrieved from the database' is flawed, and we should use the event returned by the filtering function.
* | | | Add option to allow profile queries without sharing a room (#6523)Andrew Morgan2020-03-191-5/+5
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * commit 'bfb95654c': Add option to allow profile queries without sharing a room (#6523)
| * | | Add option to allow profile queries without sharing a room (#6523)Will Hunt2019-12-161-1/+5
| | | |
* | | | Exclude rejected state events when calculating state at backwards extrems ↵Andrew Morgan2020-03-191-1/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | (#6527) * commit 'bbb75ff6e': Exclude rejected state events when calculating state at backwards extrems (#6527)
| * | | Exclude rejected state events when calculating state at backwards extrems ↵Richard van der Hoff2019-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | (#6527) This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
* | | | Persist auth/state events at backwards extremities when we fetch them (#6526)Andrew Morgan2020-03-191-39/+14
|\| | | | | | | | | | | | | | | | | | | * commit 'ff773ff72': Persist auth/state events at backwards extremities when we fetch them (#6526)
| * | | Persist auth/state events at backwards extremities when we fetch them (#6526)Richard van der Hoff2019-12-161-163/+80
| | | | | | | | | | | | | | | | The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
| * | | sanity-checking for events used in state res (#6531)Richard van der Hoff2019-12-161-0/+1
| | | | | | | | | | | | | | | | | | | | When we perform state resolution, check that all of the events involved are in the right room.
* | | | Check the room_id of events when fetching room state/auth (#6524)Andrew Morgan2020-03-191-24/+54
|\| | | | | | | | | | | | | | | | | | | * commit '35bbe4ca7': Check the room_id of events when fetching room state/auth (#6524)
| * | | Check the room_id of events when fetching room state/auth (#6524)Richard van der Hoff2019-12-161-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we request the state/auth_events to populate a backwards extremity (on backfill or in the case of missing events in a transaction push), we should check that the returned events are in the right room rather than blindly using them in the room state or auth chain. Given that _get_events_from_store_or_dest takes a room_id, it seems clear that it should be sanity-checking the room_id of the requested events, so let's do it there.
* | | | Add `include_event_in_state` to _get_state_for_room (#6521)Andrew Morgan2020-03-191-18/+21
|\| | | | | | | | | | | | | | | | | | | * commit '20d5ba16e': Add `include_event_in_state` to _get_state_for_room (#6521)
| * | | Add `include_event_in_state` to _get_state_for_room (#6521)Richard van der Hoff2019-12-161-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | Make it return the state *after* the requested event, rather than the one before it. This is a bit easier and requires fewer calls to get_events_from_store_or_dest.
* | | | Move get_state methods into FederationHandler (#6503)Andrew Morgan2020-03-191-101/+93
|\| | | | | | | | | | | | | | | | | | | * commit 'be294d6fd': Move get_state methods into FederationHandler (#6503)
| * | | Move get_state methods into FederationHandler (#6503)Richard van der Hoff2019-12-161-6/+95
| | |/ | |/| | | | | | | | | | This is a non-functional refactor as a precursor to some other work.
* | | Exclude rejected state events when calculating state at backwards extrems ↵Andrew Morgan2020-03-191-1/+1
|\ \ \ | | |/ | |/| | | | | | | | | | | | | (#6527) * commit '6920d8889': Exclude rejected state events when calculating state at backwards extrems (#6527)
| * | Exclude rejected state events when calculating state at backwards extrems ↵Richard van der Hoff2019-12-161-1/+1
| | | | | | | | | | | | | | | (#6527) This fixes a weird bug where, if you were determined enough, you could end up with a rejected event forming part of the state at a backwards-extremity. Authing that backwards extrem would then lead to us trying to pull the rejected event from the db (with allow_rejected=False), which would fail with a 404.
* | | Persist auth/state events at backwards extremities when we fetch them (#6526)Andrew Morgan2020-03-191-167/+80
|\| | | | | | | | | | | | | | * commit 'bc7de8765': Persist auth/state events at backwards extremities when we fetch them (#6526)
| * | Persist auth/state events at backwards extremities when we fetch them (#6526)Richard van der Hoff2019-12-161-167/+80
| | | | | | | | | The main point here is to make sure that the state returned by _get_state_in_room has been authed before we try to use it as state in the room.
* | | sanity-checking for events used in state res (#6531)Andrew Morgan2020-03-191-0/+1
|\| | | | | | | | | | | | | | * commit '1da15f05f': sanity-checking for events used in state res (#6531)
| * | sanity-checking for events used in state res (#6531)Richard van der Hoff2019-12-131-0/+1
| | | | | | | | | | | | | | | | | | | | | When we perform state resolution, check that all of the events involved are in the right room.
* | | Merge pull request #6496 from matrix-org/erikj/initial_sync_asnycAndrew Morgan2020-03-191-52/+44
|\| | | | | | | | | | | | | | | | | * commit 'caa52836e': Newsfile Port synapse.handlers.initial_sync to async/await
| * | Merge pull request #6496 from matrix-org/erikj/initial_sync_asnycErik Johnston2019-12-131-52/+44
| |\ \ | | | | | | | | Port synapse.handlers.initial_sync to async/await
| | * \ Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-12-118-236/+452
| | |\ \ | | | | | | | | | | | | | | | erikj/initial_sync_asnyc
| | * | | Port synapse.handlers.initial_sync to async/awaitErik Johnston2019-12-091-52/+44
| | | | |
* | | | | look up cross-signing keys from the DB in bulk (#6486)Andrew Morgan2020-03-191-8/+27
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'cb2db1799': look up cross-signing keys from the DB in bulk (#6486)
| * | | | look up cross-signing keys from the DB in bulk (#6486)Hubert Chathi2019-12-121-8/+27
| | | | |
* | | | | Check the room_id of events when fetching room state/auth (#6524)Andrew Morgan2020-03-191-23/+51
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '25f124432': Check the room_id of events when fetching room state/auth (#6524)
| * | | | Check the room_id of events when fetching room state/auth (#6524)Richard van der Hoff2019-12-121-23/+51
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we request the state/auth_events to populate a backwards extremity (on backfill or in the case of missing events in a transaction push), we should check that the returned events are in the right room rather than blindly using them in the room state or auth chain. Given that _get_events_from_store_or_dest takes a room_id, it seems clear that it should be sanity-checking the room_id of the requested events, so let's do it there.
* | | | Add `include_event_in_state` to _get_state_for_room (#6521)Andrew Morgan2020-03-191-22/+28
|\| | | | | | | | | | | | | | | | | | | * commit '204535651': Add `include_event_in_state` to _get_state_for_room (#6521)
| * | | Add `include_event_in_state` to _get_state_for_room (#6521)Richard van der Hoff2019-12-111-22/+28
| | | | | | | | | | | | | | | | | | | | Make it return the state *after* the requested event, rather than the one before it. This is a bit easier and requires fewer calls to get_events_from_store_or_dest.
* | | | Merge pull request #6517 from matrix-org/rav/event_auth/13Andrew Morgan2020-03-192-98/+88
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '894d2adda': changelog convert to async: FederationHandler._process_received_pdu convert to async: FederationHandler._get_state_for_room convert to async: FederationHandler.on_receive_pdu Convert federation backfill to async
| * | | Merge pull request #6517 from matrix-org/rav/event_auth/13Richard van der Hoff2019-12-112-98/+88
| |\ \ \ | | | | | | | | | | Port some of FederationHandler to async/await
| | * | | convert to async: FederationHandler._process_received_pduRichard van der Hoff2019-12-111-11/+10
| | | | | | | | | | | | | | | | | | | | also fix user_joined_room to consistently return deferreds
| | * | | convert to async: FederationHandler._get_state_for_roomRichard van der Hoff2019-12-111-21/+21
| | | | | | | | | | | | | | | | | | | | ... and _get_events_from_store_or_dest
| | * | | convert to async: FederationHandler.on_receive_pduRichard van der Hoff2019-12-111-27/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and associated functions: * on_receive_pdu * handle_queued_pdus * get_missing_events_for_pdu
| | * | | Convert federation backfill to asyncRichard van der Hoff2019-12-112-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PaginationHandler.get_messages is only called by RoomMessageListRestServlet, which is async. Chase the code path down from there: - FederationHandler.maybe_backfill (and nested try_backfill) - FederationHandler.backfill
* | | | | Merge pull request #6504 from matrix-org/erikj/account_validity_async_awaitAndrew Morgan2020-03-192-54/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '31905a518': Newsfile Port handlers.account_validity to async/await. Port handlers.account_data to async/await.
| * | | | Merge pull request #6504 from matrix-org/erikj/account_validity_async_awaitErik Johnston2019-12-112-55/+45
| |\ \ \ \ | | |/ / / | |/| | | Port handlers.account_validity to async/await.
| | * | | Port handlers.account_validity to async/await.Erik Johnston2019-12-102-47/+41
| | | | |
| | * | | Port handlers.account_data to async/await.Erik Johnston2019-12-101-9/+5
| | | |/ | | |/|
* | | | Clean up some logging (#6515)Andrew Morgan2020-03-191-18/+19
|\| | | | | | | | | | | | | | | | | | | * commit '7c429f92d': Clean up some logging (#6515)
| * | | Clean up some logging (#6515)Richard van der Hoff2019-12-111-18/+19
| | | | | | | | | | | | | | | | This just makes some of the logging easier to follow when things start going wrong.
* | | | Prevent redacted events from appearing in message search (#6377)Andrew Morgan2020-03-192-4/+8
|\| | | | | | | | | | | | | | | | | | | * commit 'fc316a489': Prevent redacted events from appearing in message search (#6377)
| * | | Prevent redacted events from appearing in message search (#6377)Andrew Morgan2019-12-112-4/+8
| | | |
* | | | Prevent message search in upgraded rooms we're not in (#6385)Andrew Morgan2020-03-192-11/+27
|\| | | | | | | | | | | | | | | | | | | * commit 'ea0f0ad41': Prevent message search in upgraded rooms we're not in (#6385)
| * | | Prevent message search in upgraded rooms we're not in (#6385)Andrew Morgan2019-12-112-11/+27
| | | |
* | | | Move get_state methods into FederationHandler (#6503)Andrew Morgan2020-03-191-6/+95
|\| | | | | | | | | | | | | | | | | | | * commit 'f8bc2ae88': Move get_state methods into FederationHandler (#6503)
| * | | Move get_state methods into FederationHandler (#6503)Richard van der Hoff2019-12-101-6/+95
| | | | | | | | | | | | | | | | | | | | This is a non-functional refactor as a precursor to some other work.
* | | | Allow SAML username provider plugins (#6411)Andrew Morgan2020-03-191-28/+170
|\| | | | | | | | | | | | | | | | | | | * commit '4947de5a1': Allow SAML username provider plugins (#6411)
| * | | Allow SAML username provider plugins (#6411)Andrew Morgan2019-12-101-28/+170
| | | |
* | | | Merge pull request #6506 from matrix-org/erikj/remove_snapshot_cacheAndrew Morgan2020-03-191-11/+8
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e3f528c54': Newsfile Remove SnapshotCache in favour of ResponseCache
| * | | Merge pull request #6506 from matrix-org/erikj/remove_snapshot_cacheErik Johnston2019-12-101-11/+8
| |\ \ \ | | |/ / | |/| / | | |/ Remove SnapshotCache in favour of ResponseCache
| | * Remove SnapshotCache in favour of ResponseCacheErik Johnston2019-12-091-11/+8
| | |
* | | Back out perf regression from get_cross_signing_keys_from_cache. (#6494)Andrew Morgan2020-03-191-30/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'adfdd82b2': Back out perf regression from get_cross_signing_keys_from_cache. (#6494) Fix comment Fix port db script Newsfile Fixup tests Move start up DB checks to main data store. Pass Database into the data store Move are_all_users_on_domain checks to main data store. Change DataStores to accept 'database' param.
| * | Back out perf regression from get_cross_signing_keys_from_cache. (#6494)Neil Johnson2019-12-091-30/+8
| |/ | | | | Back out cross-signing code added in Synapse 1.5.0, which caused a performance regression.
* | Merge pull request #6493 from matrix-org/erikj/invite_state_configAndrew Morgan2020-03-191-1/+3
|\| | | | | | | | | | | * commit 'e1544b0af': Newsfile Pull out room_invite_state_types config option once.
| * Merge pull request #6493 from matrix-org/erikj/invite_state_configErik Johnston2019-12-091-1/+3
| |\ | | | | | | Pull out room_invite_state_types config option once.
| | * Pull out room_invite_state_types config option once.Erik Johnston2019-12-091-1/+3
| | | | | | | | | | | | Pulling things out of config is currently surprisingly expensive.
* | | Merge pull request #6484 from matrix-org/erikj/port_sync_handlerAndrew Morgan2020-03-193-152/+131
|\| | | | | | | | | | | | | | | | | | | | * commit 'a9b393340': Fixup functions to consistently return deferreds Newsfile Port SyncHandler to async/await
| * | Merge pull request #6484 from matrix-org/erikj/port_sync_handlerErik Johnston2019-12-093-152/+131
| |\ \ | | |/ | |/| Port SyncHandler to async/await
| | * Fixup functions to consistently return deferredsErik Johnston2019-12-062-4/+4
| | |
| | * Port SyncHandler to async/awaitErik Johnston2019-12-052-151/+130
| | |
* | | Replace /admin/v1/users_paginate endpoint with /admin/v2/users (#5925)Andrew Morgan2020-03-191-9/+12
|\| | | | | | | | | | | | | | * commit '649b6bc08': Replace /admin/v1/users_paginate endpoint with /admin/v2/users (#5925)
| * | Replace /admin/v1/users_paginate endpoint with /admin/v2/users (#5925)Manuel Stahl2019-12-051-9/+12
| |/
* | Stronger typing in the federation handler (#6480)Andrew Morgan2020-03-191-24/+57
|\| | | | | | | | | * commit '63d6ad106': Stronger typing in the federation handler (#6480)
| * Stronger typing in the federation handler (#6480)Richard van der Hoff2019-12-051-24/+57
| | | | | | | | | | replace the event_info dict with an attrs thing
* | Sanity-check the rooms of auth events before pulling them in. (#6472)Andrew Morgan2020-03-191-9/+25
|\| | | | | | | | | * commit 'e1f4c83f4': Sanity-check the rooms of auth events before pulling them in. (#6472)
| * Sanity-check the rooms of auth events before pulling them in. (#6472)Richard van der Hoff2019-12-051-9/+25
| |
* | get rid of (most of) have_events from ↵Andrew Morgan2020-03-191-38/+24
|\| | | | | | | | | | | | | _update_auth_events_and_context_for_auth (#6468) * commit 'e203874ca': get rid of (most of) have_events from _update_auth_events_and_context_for_auth (#6468)
| * get rid of (most of) have_events from ↵Richard van der Hoff2019-12-041-38/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | _update_auth_events_and_context_for_auth (#6468) have_events was a map from event_id to rejection reason (or None) for events which are in our local database. It was used as filter on the list of event_ids being passed into get_events_as_list. However, since get_events_as_list will ignore any event_ids that are unknown or rejected, we can equivalently just leave it to get_events_as_list to do the filtering. That means that we don't have to keep `have_events` up-to-date, and can use `have_seen_events` instead of `get_seen_events_with_rejection` in the one place we do need it.
* | Merge pull request #6441 from syamgk/fix-parameter-mismatchAndrew Morgan2020-03-191-1/+1
|\| | | | | | | | | | | * commit 'b9449012d': Add changelog file Issue #6406 Fix parameter mismatch
| * Merge pull request #6441 from syamgk/fix-parameter-mismatchErik Johnston2019-12-041-1/+1
| |\ | | | | | | Fix issue #6406 parameter mismatch
| | * Issue #6406 Fix parameter mismatchSyam G Krishnan2019-12-041-1/+1
| | | | | | | | | | | | Signed-off-by: Syam G Krishnan <syamgk01@gmail.com>
* | | Merge pull request #6329 from matrix-org/babolivier/context_filtersAndrew Morgan2020-03-191-2/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c530f9af4': Un-remove room purge test Incorporate review Format changelog Update changelog since this isn't going to be featured in 1.6.0 Also filter state events Only filter if a filter was provided Update copyright Lint Update copyrights Changelog Add tests for /search Merge labels tests for /context and /messages Add test case Filter events_before and events_after in /context requests
| * | Merge pull request #6329 from matrix-org/babolivier/context_filtersBrendan Abolivier2019-12-041-2/+12
| |\ \ | | | | | | | | Filter state, events_before and events_after in /context requests
| | * \ Merge branch 'develop' into babolivier/context_filtersBrendan Abolivier2019-12-0414-192/+395
| | |\ \
| | * | | Incorporate reviewBrendan Abolivier2019-12-041-2/+1
| | | | |
| | * | | Also filter state eventsBrendan Abolivier2019-11-061-1/+7
| | | | |
| | * | | Only filter if a filter was providedBrendan Abolivier2019-11-051-4/+6
| | | | |
| | * | | Update copyrightBrendan Abolivier2019-11-051-1/+2
| | | | |
| | * | | Filter events_before and events_after in /context requestsBrendan Abolivier2019-11-051-2/+4
| | | | | | | | | | | | | | | | | | | | While the current version of the spec doesn't say much about how this endpoint uses filters (see https://github.com/matrix-org/matrix-doc/issues/2338), the current implementation is that some fields of an EventFilter apply (the ones that are used when running the SQL query) and others don't (the ones that are used by the filter itself) because we don't call event_filter.filter(...). This seems counter-intuitive and probably not what we want so this commit fixes it.
* | | | | Add ephemeral messages support (MSC2228) (#6409)Andrew Morgan2020-03-192-1/+130
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '54dd5dc12': Add ephemeral messages support (MSC2228) (#6409)
| * | | | Add ephemeral messages support (MSC2228) (#6409)Brendan Abolivier2019-12-032-1/+130
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Implement part [MSC2228](https://github.com/matrix-org/matrix-doc/pull/2228). The parts that differ are: * the feature is hidden behind a configuration flag (`enable_ephemeral_messages`) * self-destruction doesn't happen for state events * only implement support for the `m.self_destruct_after` field (not the `m.self_destruct` one) * doesn't send synthetic redactions to clients because for this specific case we consider the clients to be able to destroy an event themselves, instead we just censor it (by pruning its JSON) in the database
* | | | Transfer power level state events on room upgrade (#6237)Andrew Morgan2020-03-191-5/+31
|\| | | | | | | | | | | | | | | | | | | * commit '72078e4be': Transfer power level state events on room upgrade (#6237)
| * | | Transfer power level state events on room upgrade (#6237)Andrew Morgan2019-12-021-5/+31
| | |/ | |/|
* | | Fix: Pillow error when uploading RGBA image (#3325) (#6241)Andrew Morgan2020-03-193-7/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '81731c6e7': Fix: Pillow error when uploading RGBA image (#3325) (#6241) Add User-Interactive Auth to /account/3pid/add (#6119) Lint Changelog Discard retention policies when retrieving state blacklist more tests Newsfile Add tests Propagate reason in remotely rejected invites MSC2367 Allow reason field on all member events
| * | Merge pull request #6434 from matrix-org/erikj/msc2367_membership_reasonsErik Johnston2019-11-293-7/+15
| |\ \ | | | | | | | | Implement MSC 2367 - Membership Reasons
| | * | Propagate reason in remotely rejected invitesErik Johnston2019-11-283-7/+15
| | | |
| * | | Discard retention policies when retrieving stateBrendan Abolivier2019-11-281-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Purge jobs don't delete the latest event in a room in order to keep the forward extremity and not break the room. On the other hand, get_state_events, when given an at_token argument calls filter_events_for_client to know if the user can see the event that matches that (sync) token. That function uses the retention policies of the events it's given to filter out those that are too old from a client's view. Some clients, such as Riot, when loading a room, request the list of members for the latest sync token it knows about, and get confused to the point of refusing to send any message if the server tells it that it can't get that information. This can happen very easily with the message retention feature turned on and a room with low activity so that the last event sent becomes too old according to the room's retention policy. An easy and clean fix for that issue is to discard the room's retention policies when retrieving state.
* | | Remove local threepids on account deactivation (#6426)Andrew Morgan2020-03-181-0/+3
|\| | | | | | | | | | | | | | * commit 'a9c44d400': Remove local threepids on account deactivation (#6426)
| * | Remove local threepids on account deactivation (#6426)Andrew Morgan2019-11-281-0/+3
| | |
* | | add etag and count to key backup endpoints (#5858)Andrew Morgan2020-03-181-50/+80
|\| | | | | | | | | | | | | | * commit '0d27aba90': add etag and count to key backup endpoints (#5858)
| * | add etag and count to key backup endpoints (#5858)Hubert Chathi2019-11-271-50/+80
| | |
* | | Merge pull request #6358 from matrix-org/babolivier/message_retentionAndrew Morgan2020-03-181-6/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd31f69afa': clean up buildkite output Don't restrict the tests to v1 rooms Fix worker mode Fix 3PID invite exchange Lint again Lint again Lint Don't apply retention policy based filtering on state events Implement per-room message retention policies
| * | Merge pull request #6358 from matrix-org/babolivier/message_retentionBrendan Abolivier2019-11-273-4/+110
| |\ \ | | | | | | | | Implement message retention policies (MSC1763)
| | * \ Merge branch 'develop' into babolivier/message_retentionBrendan Abolivier2019-11-269-88/+111
| | |\ \
| | * | | Fix 3PID invite exchangeBrendan Abolivier2019-11-191-1/+1
| | | | |
| | * | | LintBrendan Abolivier2019-11-191-11/+6
| | | | |
| | * | | Implement per-room message retention policiesBrendan Abolivier2019-11-043-3/+114
| | | |/ | | |/|
* | | | Merge pull request #6343 from matrix-org/rav/event_auth/4Andrew Morgan2020-03-181-37/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '651d930f1': remove confusing fixme newsfile Use get_events_as_list rather than lots of calls to get_event Update some docstrings and comments Simplify _update_auth_events_and_context_for_auth
| * | | Merge pull request #6343 from matrix-org/rav/event_auth/4Richard van der Hoff2019-11-261-37/+44
| |\ \ \ | | |_|/ | |/| | Refactor _update_auth_events_and_context_for_auth
| | * | remove confusing fixmeRichard van der Hoff2019-11-261-6/+0
| | | |
| | * | Merge remote-tracking branch 'origin/develop' into rav/event_auth/4Richard van der Hoff2019-11-186-11/+11
| | |\ \
| | * | | Use get_events_as_list rather than lots of calls to get_eventRichard van der Hoff2019-11-081-16/+8
| | | | | | | | | | | | | | | | | | | | It's more efficient and clearer.
| | * | | Update some docstrings and commentsRichard van der Hoff2019-11-081-8/+31
| | | | |
| | * | | Simplify _update_auth_events_and_context_for_authRichard van der Hoff2019-11-081-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | move event_key calculation into _update_context_for_auth_events, since it's only used there.
* | | | | Merge pull request #6332 from matrix-org/erikj/query_devices_fixAndrew Morgan2020-03-181-3/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f9f1c8acb': Fixup docs Newsfile Fix caching devices for remote servers in worker.
| * | | | Merge pull request #6332 from matrix-org/erikj/query_devices_fixErik Johnston2019-11-261-3/+16
| |\ \ \ \ | | | | | | | | | | | | Fix caching devices for remote servers in worker.
| | * | | | Fix caching devices for remote servers in worker.Erik Johnston2019-11-051-3/+16
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the `/keys/query` API is hit on client_reader worker Synapse may decide that it needs to resync some remote deivces. Usually this happens on master, and then gets cached. However, that fails on workers and so it falls back to fetching devices from remotes directly, which may in turn fail if the remote is down.
* | | | | Clean up newline quote marks around the codebase (#6362)Andrew Morgan2020-03-181-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3916e1b97': Clean up newline quote marks around the codebase (#6362) update macOS installation instructions
| * | | | Clean up newline quote marks around the codebase (#6362)Andrew Morgan2019-11-211-1/+1
| | | | |
* | | | | Merge pull request #6335 from matrix-org/erikj/rc_login_cleanupsAndrew Morgan2020-03-181-53/+31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '83446a18f': Lint Apply suggestions from code review Newsfile Add failed auth ratelimiting to UIA Only do `rc_login` ratelimiting on succesful login.
| * | | | Merge pull request #6335 from matrix-org/erikj/rc_login_cleanupsBrendan Abolivier2019-11-201-53/+31
| |\ \ \ \ | | |_|_|/ | |/| | | Only do `rc_login` ratelimiting on succesful login.
| | * | | Apply suggestions from code reviewErik Johnston2019-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | Co-Authored-By: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-Authored-By: Brendan Abolivier <babolivier@matrix.org>
| | * | | Add failed auth ratelimiting to UIAErik Johnston2019-11-061-1/+32
| | | | |
| | * | | Only do `rc_login` ratelimiting on succesful login.Erik Johnston2019-11-061-54/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were doing this in a number of places which meant that some login code paths incremented the counter multiple times. It was also applying ratelimiting to UIA endpoints, which was probably not intentional. In particular, some custom auth modules were calling `check_user_exists`, which incremented the counters, meaning that people would fail to login sometimes.
* | | | Replace instance variations of homeserver with correct case/spacing (#6357)Andrew Morgan2020-03-186-11/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6e1b40dc2': sample config Add changelog A couple more instances Replace instance variations of homeserver with correct case/spacing
| * | | Replace instance variations of homeserver with correct case/spacingAndrew Morgan2019-11-126-11/+11
| | |/ | |/|
* | | Merge pull request #6295 from matrix-org/erikj/split_purge_historyAndrew Morgan2020-03-181-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f713c01e2': Move type annotation into docstring Fix deleting state groups during room purge. Use correct type annotation Change to not require a state_groups.room_id index. Fix up comment Update log line to lie a little less Add state_groups.room_id index Docstrings Fix purge room API Newsfile Split purge API into events vs state
| * | Merge pull request #6295 from matrix-org/erikj/split_purge_historyErik Johnston2019-11-081-2/+4
| |\ \ | | | | | | | | Split purge API into events vs state and add PurgeEventsStorage
| | * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-11-0416-144/+357
| | |\| | | | | | | | | | | | | erikj/split_purge_history
| | * | Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2019-10-3115-69/+95
| | |\ \ | | | | | | | | | | | | | | | erikj/split_purge_history
| | * | | Split purge API into events vs stateErik Johnston2019-10-301-2/+5
| | | | |
* | | | | Merge pull request #6235 from matrix-org/anoa/room_upgrade_groupsAndrew Morgan2020-03-181-0/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e914cf12f': tweak changelog Re-add docstring, with caveats detailed Transfer upgraded rooms on groups
| * | | | Merge pull request #6235 from matrix-org/anoa/room_upgrade_groupsAndrew Morgan2019-11-071-0/+9
| |\ \ \ \
| | * | | | Re-add docstring, with caveats detailedAndrew Morgan2019-11-041-1/+1
| | | | | |
| | * | | | Transfer upgraded rooms on groupsAndrew Morgan2019-11-041-0/+9
| | | |_|/ | | |/| |
* | | | | Make numeric user_id checker start at @0, and don't ratelimit on checking ↵Andrew Morgan2020-03-181-17/+32
|\| | | | | | | | | | | | | | | | | | | (#6338)
| * | | | raise exception after multiple failuresAndrew Morgan2019-11-061-3/+10
| | | | |
| * | | | Address review commentsAndrew Morgan2019-11-061-12/+12
| | | | |
| * | | | Don't forget to ratelimit calls outside of RegistrationHandlerAndrew Morgan2019-11-061-2/+2
| | | | |
| * | | | Numeric ID checker now checks @0, don't ratelimit on checkingAndrew Morgan2019-11-061-16/+25
| | | | |
* | | | | Fix bug which caused rejected events to be stored with the wrong room state ↵Andrew Morgan2020-03-161-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#6320) * commit '807ec3bd9': Fix bug which caused rejected events to be stored with the wrong room state (#6320)
| * | | | Fix bug which caused rejected events to be stored with the wrong room state ↵Richard van der Hoff2019-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#6320) Fixes a bug where rejected events were persisted with the wrong state group. Also fixes an occasional internal-server-error when receiving events over federation which are rejected and (possibly because they are backwards-extremities) have no prev_group. Fixes #6289.
* | | | | Add some checks that we aren't using state from rejected events (#6330)Andrew Morgan2020-03-161-1/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '0e3ab8afd': Add some checks that we aren't using state from rejected events (#6330)
| * | | | Add some checks that we aren't using state from rejected events (#6330)Richard van der Hoff2019-11-051-1/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Raise an exception if accessing state for rejected events Add some sanity checks on accessing state_group etc for rejected events. * Skip calculating push actions for rejected events It didn't actually cause any bugs, because rejected events get filtered out at various later points, but there's not point in trying to calculate the push actions for a rejected event.
* | | | Merge pull request #6301 from matrix-org/babolivier/msc2326Andrew Morgan2020-03-161-19/+19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f496d2587': Incorporate review Factor out an _AsyncEventContextImpl (#6298) Update synapse/storage/data_stores/main/schema/delta/56/event_labels.sql Add more data to the event_labels table and fix the indexes Add unstable feature flag Lint Incorporate review Lint Changelog Add integration tests for /messages Add more integration testing Add integration tests for sync Add unit tests Add index on label Implement filtering Store labels for new events Add database table for keeping track of labels on events
| * | | Factor out an _AsyncEventContextImpl (#6298)Richard van der Hoff2019-11-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | The intention here is to make it clearer which fields we can expect to be populated when: notably, that the _event_type etc aren't used for the synchronous impl of EventContext.
* | | | Support for routing outbound HTTP requests via a proxy (#6239)Andrew Morgan2020-03-161-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit '1cb84c648': Support for routing outbound HTTP requests via a proxy (#6239)
| * | | Support for routing outbound HTTP requests via a proxy (#6239)Richard van der Hoff2019-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `http_proxy` and `HTTPS_PROXY` env vars can be set to a `host[:port]` value which should point to a proxy. The address of the proxy should be excluded from IP blacklists such as the `url_preview_ip_range_blacklist`. The proxy will then be used for * push * url previews * phone-home stats * recaptcha validation * CAS auth validation It will *not* be used for: * Application Services * Identity servers * Outbound federation * In worker configurations, connections from workers to masters Fixes #4198.
* | | | Remove last usages of deprecated logging.warn method (#6314)Andrew Morgan2020-03-161-1/+1
|\| | | | | | | | | | | | | | | | | | | * commit 'fe1f2b452': Remove last usages of deprecated logging.warn method (#6314)
| * | | Remove last usages of deprecated logging.warn method (#6314)Andrew Morgan2019-11-011-1/+1
| | | |
* | | | Depublish a room from the public rooms list when it is upgraded (#6232)Andrew Morgan2020-03-163-29/+90
|\| | | | | | | | | | | | | | | | | | | * commit 'ace947e8d': Depublish a room from the public rooms list when it is upgraded (#6232)
| * | | Depublish a room from the public rooms list when it is upgraded (#6232)Andrew Morgan2019-11-013-29/+90
| | | |