summary refs log tree commit diff
path: root/synapse/handlers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Push event reports to appservices github/hs/push-reports-to-as hs/push-reports-to-asWill Hunt2020-10-131-1/+22
|
* Save a few DB callsxWill Hunt2020-10-131-3/+3
|
* Add extra statement to notify_interested_services_ephemeralWill Hunt2020-10-131-0/+3
|
* Apply suggestions from code reviewWill Hunt2020-10-131-2/+2
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Merge remote-tracking branch 'origin/develop' into hs/simple-edus-down-as-apiWill Hunt2020-10-0817-213/+488
|\
| * Add typing information to the device handler. (#8407)Patrick Cloke2020-10-071-35/+54
| |
| * Fix returning incorrect prev_batch token in incremental sync (#8486)Erik Johnston2020-10-071-1/+6
| |
| * Add support for MSC2697: Dehydrated devices (#8380)Hubert Chathi2020-10-071-2/+82
| | | | | | | | This allows a user to store an offline device on the server and then restore it at a subsequent login.
| * Merge pull request #8463 from matrix-org/rav/clean_up_event_handlingRichard van der Hoff2020-10-073-90/+78
| |\ | | | | | | Reduce inconsistencies between codepaths for membership and non-membership events.
| | * update wordingRichard van der Hoff2020-10-071-2/+3
| | |
| | * kill off `send_nonmember_event`Richard van der Hoff2020-10-052-51/+27
| | | | | | | | | | | | This is now redundant, and we can just call `handle_new_client_event` directly.
| | * pull up event.sender assertionRichard van der Hoff2020-10-052-4/+5
| | |
| | * Move shadow-ban check down into `handle_new_client_event`.Richard van der Hoff2020-10-051-8/+24
| | |
| | * De-duplicate duplicate handlingRichard van der Hoff2020-10-052-38/+32
| | | | | | | | | | | | | | | move the "duplicate state event" handling down into `handle_new_client_event` where it can be shared between multiple call paths.
| * | Combine `SpamCheckerApi` with the more generic `ModuleApi`. (#8464)Richard van der Hoff2020-10-071-0/+7
| | | | | | | | | | | | | | | Lots of different module apis is not easy to maintain. Rather than adding yet another ModuleApi(hs, hs.get_auth_handler()) incantation, first add an hs.get_module_api() method and use it where possible.
| * | Add support for MSC2732: olm fallback keys (#8312)Hubert Chathi2020-10-062-0/+24
| |/
| * Allow ThirdPartyEventRules modules to manipulate public room state (#8292)Andrew Morgan2020-10-052-0/+19
| | | | | | | | | | This PR allows `ThirdPartyEventRules` modules to view, manipulate and block changes to the state of whether a room is published in the public rooms directory. While the idea of whether a room is in the public rooms list is not kept within an event in the room, `ThirdPartyEventRules` generally deal with controlling which modifications can happen to a room. Public rooms fits within that idea, even if its toggle state isn't controlled through a state event.
| * Remove stream ordering from Metadata dict (#8452)Richard van der Hoff2020-10-053-7/+13
| | | | | | | | | | | | | | | | There's no need for it to be in the dict as well as the events table. Instead, we store it in a separate attribute in the EventInternalMetadata object, and populate that on load. This means that we can rely on it being correctly populated for any event which has been persited to the database.
| * Do not assume that account data is of the correct form. (#8454)Patrick Cloke2020-10-052-11/+14
| | | | | | | | This fixes a bug where `m.ignored_user_list` was assumed to be a dict, leading to odd behavior for users who set it to something else.
| * Allow background tasks to be run on a separate worker. (#8369)Patrick Cloke2020-10-022-2/+2
| |
| * Add config option for always using "userinfo endpoint" for OIDC (#7658)BBBSnowball2020-10-011-4/+7
| | | | | | This allows for connecting to certain IdPs, e.g. GitLab.
| * Enable mypy checking for unreachable code and fix instances. (#8432)Patrick Cloke2020-10-014-5/+3
| |
| * Make token serializing/deserializing async (#8427)Erik Johnston2020-09-305-20/+22
| | | | | | The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
| * Allow additional SSO properties to be passed to the client (#8413)Patrick Cloke2020-09-302-4/+112
| |
| * Merge pull request #8420 from matrix-org/rav/state_res_statsRichard van der Hoff2020-09-301-5/+8
| |\ | | | | | | Report metrics on expensive rooms for state res
| | * Move `resolve_events_with_store` into StateResolutionHandlerRichard van der Hoff2020-09-291-5/+8
| | |
| * | Various clean ups to room stream tokens. (#8423)Erik Johnston2020-09-296-16/+22
| |/
| * Mypy fixes for `synapse.handlers.federation` (#8422)Richard van der Hoff2020-09-291-4/+9
| | | | | | For some reason, an apparently unrelated PR upset mypy about this module. Here are a number of little fixes.
| * Fix handling of connection timeouts in outgoing http requests (#8400)Richard van der Hoff2020-09-291-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove `on_timeout_cancel` from `timeout_deferred` The `on_timeout_cancel` param to `timeout_deferred` wasn't always called on a timeout (in particular if the canceller raised an exception), so it was unreliable. It was also only used in one place, and to be honest it's easier to do what it does a different way. * Fix handling of connection timeouts in outgoing http requests Turns out that if we get a timeout during connection, then a different exception is raised, which wasn't always handled correctly. To fix it, catch the exception in SimpleHttpClient and turn it into a RequestTimedOutError (which is already a documented exception). Also add a description to RequestTimedOutError so that we can see which stage it failed at. * Fix incorrect handling of timeouts reading federation responses This was trapping the wrong sort of TimeoutError, so was never being hit. The effect was relatively minor, but we should fix this so that it does the expected thing. * Fix inconsistent handling of `timeout` param between methods `get_json`, `put_json` and `delete_json` were applying a different timeout to the response body to `post_json`; bring them in line and test. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
| * A pair of tiny cleanups in the federation request code. (#8401)Richard van der Hoff2020-09-281-1/+1
| |
* | Fix types / add docstringsWill Hunt2020-10-084-14/+37
| |
* | Fix 3 more testsWill Hunt2020-10-011-2/+1
| |
* | fix collection bugWill Hunt2020-10-011-1/+2
| |
* | Fixup typesWill Hunt2020-10-011-1/+4
| |
* | Send EDUs over /transaction and drop device stuffWill Hunt2020-10-011-56/+15
| |
* | Add basic support for device list updates github/hs/super-wip-edus-down-sync hs/super-wip-edus-down-syncWill Hunt2020-09-302-58/+92
| |
* | Merge branch 'develop' into hs/super-wip-edus-down-syncWill Hunt2020-09-285-83/+123
|\|
| * Allow existing users to login via OpenID Connect. (#8345)Tdxdxoz2020-09-251-15/+27
| | | | | | | | | | | | | | Co-authored-by: Benjamin Koch <bbbsnowball@gmail.com> This adds configuration flags that will match a user to pre-existing users when logging in via OpenID Connect. This is useful when switching to an existing SSO system.
| * Add EventStreamPosition type (#8388)Erik Johnston2020-09-243-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to remove some of the places we pass around `int`, where it can represent one of two things: 1. the position of an event in the stream; or 2. a token that partitions the stream, used as part of the stream tokens. The valid operations are then: 1. did a position happen before or after a token; 2. get all events that happened before or after a token; and 3. get all events between two tokens. (Note that we don't want to allow other operations as we want to change the tokens to be vector clocks rather than simple ints)
| * Factor out `_send_dummy_event_for_room` (#8370)Richard van der Hoff2020-09-231-48/+54
| | | | | | this makes it possible to use from the manhole, and seems cleaner anyway.
| * Create function to check for long names in devices (#8364)Dionysis Grigoropoulos2020-09-221-6/+24
| | | | | | | | | | | | | | | | | | * Create a new function to verify that the length of a device name is under a certain threshold. * Refactor old code and tests to use said function. * Verify device name length during registration of device * Add a test for the above Signed-off-by: Dionysis Grigoropoulos <dgrig@erethon.com>
* | Add support for device messages, start support for device listsWill Hunt2020-09-221-25/+51
| |
* | Last little bitsWill Hunt2020-09-211-8/+32
| |
* | Changes to handlers to support fetching events for appservicesWill Hunt2020-09-213-0/+90
|/
* Fix a bad merge from release-v1.20.0. (#8354)Patrick Cloke2020-09-181-1/+1
|
* Merge tag 'v1.20.0rc5' into developPatrick Cloke2020-09-182-12/+61
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.20.0rc5 (2020-09-18) ============================== In addition to the below, Synapse 1.20.0rc5 also includes the bug fix that was included in 1.19.3. Features -------- - Add flags to the `/versions` endpoint for whether new rooms default to using E2EE. ([\#8343](https://github.com/matrix-org/synapse/issues/8343)) Bugfixes -------- - Fix rate limiting of federation `/send` requests. ([\#8342](https://github.com/matrix-org/synapse/issues/8342)) - Fix a longstanding bug where back pagination over federation could get stuck if it failed to handle a received event. ([\#8349](https://github.com/matrix-org/synapse/issues/8349)) Internal Changes ---------------- - Blacklist [MSC2753](https://github.com/matrix-org/matrix-doc/pull/2753) SyTests until it is implemented. ([\#8285](https://github.com/matrix-org/synapse/issues/8285))
| * Intelligently select extremities used in backfill. (#8349)Erik Johnston2020-09-182-12/+61
| | | | | | | | | | | | | | | | | | Instead of just using the most recent extremities let's pick the ones that will give us results that the pagination request cares about, i.e. pick extremities only if they have a smaller depth than the pagination token. This is useful when we fail to backfill an extremity, as we no longer get stuck requesting that same extremity repeatedly.
* | Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-1820-23/+23
| | | | | | | | | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* | Switch metaclass initialization to python 3-compatible syntax (#8326)Jonathan de Jong2020-09-161-3/+1
| |
* | Use slots in attrs classes where possible (#8296)Patrick Cloke2020-09-146-29/+15
| | | | | | | | | | slots use less memory (and attribute access is faster) while slightly limiting the flexibility of the class attributes. This focuses on objects which are instantiated "often" and for short periods of time.
* | Improve SAML error messages (#8248)Patrick Cloke2020-09-142-61/+112
| |
* | Add experimental support for sharding event persister. Again. (#8294)Erik Johnston2020-09-144-32/+47
| | | | | | | | | | | | This is *not* ready for production yet. Caveats: 1. We should write some tests... 2. The stream token that we use for events can get stalled at the minimum position of all writers. This means that new events may not be processed and e.g. sent down sync streams if a writer isn't writing or is slow.
* | Make `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281)Erik Johnston2020-09-117-27/+26
| |
* | Clean up `Notifier.on_new_room_event` code path (#8288)Erik Johnston2020-09-102-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is that we pass the `max_stream_id` to everything, and only use the stream ID of the particular event to figure out *when* the max stream position has caught up to the event and we can notify people about it. This is to maintain the distinction between the position of an item in the stream (i.e. event A has stream ID 513) and a token that can be used to partition the stream (i.e. give me all events after stream ID 352). This distinction becomes important when the tokens are more complicated than a single number, which they will be once we start tracking the position of multiple writers in the tokens. The valid operations here are: 1. Is a position before or after a token 2. Fetching all events between two tokens 3. Merging multiple tokens to get the "max", i.e. `C = max(A, B)` means that for all positions P where P is before A *or* before B, then P is before C. Future PR will change the token type to a dedicated type.
* | Remove some unused distributor signals (#8216)Patrick Cloke2020-09-094-93/+5
| | | | | | | | | | Removes the `user_joined_room` and stops calling it since there are no observers. Also cleans-up some other unused signals and related code.
* | Fixup pusher pool notifications (#8287)Erik Johnston2020-09-092-2/+2
| | | | | | | | | | `pusher_pool.on_new_notifications` expected a min and max stream ID, however that was not what we were passing in. Instead, let's just pass it the current max stream ID and have it track the last stream ID it got passed. I believe that it mostly worked as we called the function for every event. However, it would break for events that got persisted out of order, i.e, that were persisted but the max stream ID wasn't incremented as not all preceding events had finished persisting, and push for that event would be delayed until another event got pushed to the effected users.
* | Revert "Fixup pusher pool notifications"Erik Johnston2020-09-092-2/+2
| | | | | | | | This reverts commit e7fd336a53a4ca489cdafc389b494d5477019dc0.
* | Fixup pusher pool notificationsErik Johnston2020-09-092-2/+2
| |
* | Fix mypy error on develop (#8282)Erik Johnston2020-09-081-3/+6
| |
* | Add types to StreamToken and RoomStreamToken (#8279)Erik Johnston2020-09-081-3/+2
| | | | | | The intention here is to change `StreamToken.room_key` to be a `RoomStreamToken` in a future PR, but that is a big enough change without this refactoring too.
* | Clean up types for PaginationConfig (#8250)Erik Johnston2020-09-084-44/+27
|/ | | This removes `SourcePaginationConfig` and `get_pagination_rows`. The reasoning behind this is that these generic classes/functions erased the types of the IDs it used (i.e. instead of passing around `StreamToken` it'd pass in e.g. `token.room_key`, which don't have uniform types).
* Stop sub-classing object (#8249)Patrick Cloke2020-09-0425-32/+32
|
* Revert "Add experimental support for sharding event persister. (#8170)" (#8242)Brendan Abolivier2020-09-044-47/+32
| | | | | | | * Revert "Add experimental support for sharding event persister. (#8170)" This reverts commit 82c1ee1c22a87b9e6e3179947014b0f11c0a1ac3. * Changelog
* Add type hints to more handlers (#8244)Erik Johnston2020-09-033-79/+106
|
* Fix typing for `@cached` wrapped functions (#8240)Erik Johnston2020-09-031-5/+5
| | | This requires adding a mypy plugin to fiddle with the type signatures a bit.
* Fix typing for SyncHandler (#8237)Erik Johnston2020-09-031-5/+7
|
* Re-implement unread counts (again) (#8059)Brendan Abolivier2020-09-021-15/+18
|
* Add experimental support for sharding event persister. (#8170)Erik Johnston2020-09-024-32/+47
| | | | | | This is *not* ready for production yet. Caveats: 1. We should write some tests... 2. The stream token that we use for events can get stalled at the minimum position of all writers. This means that new events may not be processed and e.g. sent down sync streams if a writer isn't writing or is slow.
* Fix errors when updating the user directory with invalid data (#8223)Patrick Cloke2020-09-012-1/+13
|
* Convert additional databases to async/await part 2 (#8200)Patrick Cloke2020-09-012-20/+5
|
* Move and rename `get_devices_with_keys_by_user` (#8204)Richard van der Hoff2020-09-011-1/+3
| | | | | | | | | | | | | | | | | | * Move `get_devices_with_keys_by_user` to `EndToEndKeyWorkerStore` this seems a better fit for it. This commit simply moves the existing code: no other changes at all. * Rename `get_devices_with_keys_by_user` to better reflect what it does. * get_device_stream_token abstract method To avoid referencing fields which are declared in the derived classes, make `get_device_stream_token` abstract, and define that in the classes which define `_device_list_id_gen`.
* Rename `get_e2e_device_keys` to better reflect its purpose (#8205)Richard van der Hoff2020-08-291-2/+2
| | | | | | | | | | | ... and to show that it does something slightly different to `_get_e2e_device_keys_txn`. `include_all_devices` and `include_deleted_devices` were never used (and `include_deleted_devices` was broken, since that would cause `None`s in the result which were not handled in the loop below. Add some typing too.
* Convert ReadWriteLock to async/await. (#8202)Patrick Cloke2020-08-281-23/+26
|
* Convert state and stream stores and related code to async (#8194)Patrick Cloke2020-08-281-1/+1
|
* Ensure that the OpenID Connect remote ID is a string. (#8190)Patrick Cloke2020-08-281-0/+3
|
* Convert additional database code to async/await. (#8195)Patrick Cloke2020-08-281-2/+2
|
* Define StateMap as immutable and add a MutableStateMap type. (#8183)Patrick Cloke2020-08-283-9/+19
|
* Move and refactor LoginRestServlet helper methods (#8182)Andrew Morgan2020-08-281-1/+87
| | | | | | | This is split out from https://github.com/matrix-org/synapse/pull/7438, which had gotten rather large. `LoginRestServlet` has a couple helper methods, `login_submission_legacy_convert` and `login_id_thirdparty_from_phone`. They're primarily used for converting legacy user login submissions to "identifier" dicts ([see spec](https://matrix.org/docs/spec/client_server/r0.6.1#post-matrix-client-r0-login)). Identifying information such as usernames or 3PID information used to be top-level in the login body. They're now supposed to be put inside an [identifier](https://matrix.org/docs/spec/client_server/r0.6.1#identifier-types) parameter instead. #7438's purpose is to allow using the new identifier parameter during User-Interactive Authentication, which is currently handled in AuthHandler. That's why I've moved these helper methods there. I also moved the refactoring of these method from #7438 as they're relevant.
* Convert simple_update* and simple_select* to async (#8173)Patrick Cloke2020-08-271-4/+2
|
* Do not propagate typing notifications from shadow-banned users. (#8176)Patrick Cloke2020-08-261-5/+16
|
* Remove unused parameter from, and add safeguard in, get_room_data (#8174)Andrew Morgan2020-08-261-8/+12
| | | | | | Small cleanup PR. * Removed the unused `is_guest` argument * Added a safeguard to a (currently) impossible code path, fixing static checking at the same time.
* Do not propagate profile changes of shadow-banned users into rooms. (#8157)Patrick Cloke2020-08-262-3/+16
|
* Do not allow send_nonmember_event to be called with shadow-banned users. (#8158)Patrick Cloke2020-08-251-5/+34
|
* Merge tag 'v1.19.1rc1' into developBrendan Abolivier2020-08-251-21/+25
|\ | | | | | | | | | | | | | | | | | | | | Synapse 1.19.1rc1 (2020-08-25) ============================== Bugfixes -------- - Fix a bug introduced in v1.19.0 where appservices with ratelimiting disabled would still be ratelimited when joining rooms. ([\#8139](https://github.com/matrix-org/synapse/issues/8139)) - Fix a bug introduced in v1.19.0 that would cause e.g. profile updates to fail due to incorrect application of rate limits on join requests. ([\#8153](https://github.com/matrix-org/synapse/issues/8153))
| * Fix join ratelimiter breaking profile updates and idempotency (#8153)Brendan Abolivier2020-08-241-21/+25
| |
| * Do not apply ratelimiting on joins to appservices (#8139)Will Hunt2020-08-241-6/+8
| | | | | | | | | | | | Add new method ratelimiter.can_requester_do_action and ensure that appservices are exempt from being ratelimited. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
* | Add type hints for state. (#8140)Patrick Cloke2020-08-243-15/+21
| |
* | Stop shadow-banned users from sending non-member events. (#8142)Patrick Cloke2020-08-243-1/+34
| |
* | Allow capping a room's retention policy (#8104)Brendan Abolivier2020-08-241-7/+29
| |
* | Do not apply ratelimiting on joins to appservices (#8139)Will Hunt2020-08-211-6/+8
| | | | | | | | | | | | Add new method ratelimiter.can_requester_do_action and ensure that appservices are exempt from being ratelimited. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
* | Allow denying or shadow banning registrations via the spam checker (#8034)Patrick Cloke2020-08-205-8/+76
| |
* | Stop shadow-banned users from sending invites. (#8095)Patrick Cloke2020-08-202-4/+74
| |
* | Improve the error code when trying to register using a name reserved for ↵Patrick Cloke2020-08-201-1/+3
| | | | | | | | guests. (#8135)
* | Use the JSON encoder without whitespace in more places. (#8124)Patrick Cloke2020-08-201-3/+2
| |
* | Be stricter about JSON that is accepted by Synapse (#8106)Patrick Cloke2020-08-195-15/+14
| |
* | Convert events worker database to async/await. (#8071)Patrick Cloke2020-08-183-15/+9
| |
* | Fix the return type of send_nonmember_events. (#8112)Patrick Cloke2020-08-181-1/+1
| |
* | Return the previous stream token if a non-member event is a duplicate. (#8093)Patrick Cloke2020-08-181-10/+15
| |
* | Use the default templates when a custom template file cannot be found (#8037)Andrew Morgan2020-08-173-28/+9
| | | | | | Fixes https://github.com/matrix-org/synapse/issues/6583
* | Convert stream database to async/await. (#8074)Patrick Cloke2020-08-171-1/+1
| |
* | Add a shadow-banned flag to users. (#8092)Patrick Cloke2020-08-141-0/+8
| |
* | Add type hints to synapse.handlers.room (#8090)Erik Johnston2020-08-141-38/+66
| |
* | Run `remove_push_actions_from_staging` in foreground (#8081)Richard van der Hoff2020-08-131-3/+1
|/ | | | | | | If we got an error persisting an event, we would try to remove the push actions asynchronously, which would lead to a 'Re-starting finished log context' warning. I don't think there's any need for this to be asynchronous.
* Add type hints to handlers.message and events.builder (#8067)Erik Johnston2020-08-122-13/+21
|
* Merge remote-tracking branch 'origin/develop' into erikj/type_serverErik Johnston2020-08-112-10/+36
|\
| * Add typing info to Notifier (#8058)Erik Johnston2020-08-111-4/+0
| |
| * Implement login blocking based on SAML attributes (#8052)Richard van der Hoff2020-08-111-6/+36
| | | | | | | | | | | | | | Hopefully this mostly speaks for itself. I also did a bit of cleaning up of the error handling. Fixes #8047
* | Change HomeServer definition to work with typing.Erik Johnston2020-08-111-3/+5
|/ | | | | | | | | | Duplicating function signatures between server.py and server.pyi is silly. This commit changes that by changing all `build_*` methods to `get_*` methods and changing the `_make_dependency_method` to work work as a descriptor that caches the produced value. There are some changes in other files that were made to fix the typing in server.py.
* Add an assertion on prev_events in create_new_client_event (#8041)Richard van der Hoff2020-08-101-0/+9
| | | | | | I think this would have caught all the cases in https://github.com/matrix-org/synapse/issues/7642 - and I think a 500 makes more sense here than a 403
* Revert #7736 (#8039)Brendan Abolivier2020-08-061-6/+0
|
* Convert synapse.api to async/await (#8031)Patrick Cloke2020-08-062-2/+2
|
* Convert run_as_background_process inner function to async. (#8032)Patrick Cloke2020-08-061-1/+1
|
* Improve performance of the register endpoint (#8009)Patrick Cloke2020-08-061-7/+12
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-053-4/+4
|
* Convert streams to async. (#8014)Patrick Cloke2020-08-045-10/+10
|
* Remove signature check on v1 identity server lookups (#8001)Andrew Morgan2020-08-031-31/+3
| | | | | | | We've [decided](https://github.com/matrix-org/synapse/issues/5253#issuecomment-665976308) to remove the signature check for v1 lookups. The signature check has been removed in v2 lookups. v1 lookups are currently deprecated. As mentioned in the above linked issue, this verification was causing deployments for the vector.im and matrix.org IS deployments, and this change is the simplest solution, without being unjustified. Implementations are encouraged to use the v2 lookup API as it has [increased privacy benefits](https://github.com/matrix-org/matrix-doc/pull/2134).
* Prevent join->join membership transitions changing member count (#7977)Andrew Morgan2020-08-031-1/+1
| | | | | | | | | | | `StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc. However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information. This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point. Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update). Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
* Convert replication code to async/await. (#7987)Patrick Cloke2020-08-031-1/+1
|
* Convert ACME code to async/await. (#7989)Patrick Cloke2020-08-031-7/+4
|
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2020-07-316-37/+56
|\ | | | | | | erikj/add_rate_limiting_to_joins
| * Fix invite rejection when we have no forward-extremeties (#7980)Richard van der Hoff2020-07-301-8/+21
| | | | | | | | | | | | | | | | | | | | Thanks to some slightly overzealous cleanup in the `delete_old_current_state_events`, it's possible to end up with no `event_forward_extremities` in a room where we have outstanding local invites. The user would then get a "no create event in auth events" when trying to reject the invite. We can hack around it by using the dangling invite as the prev event.
| * Convert federation client to async/await. (#7975)Patrick Cloke2020-07-301-21/+14
| |
| * Convert appservice to async. (#7973)Patrick Cloke2020-07-301-5/+5
| |
| * Add additional logging for SAML sessions. (#7971)Patrick Cloke2020-07-291-0/+3
| |
| * Re-implement unread counts (#7736)Brendan Abolivier2020-07-291-0/+6
| |
| * Option to allow server admins to join complex rooms (#7902)lugino-emeritus2020-07-281-2/+6
| | | | | | | | | | Fixes #7901. Signed-off-by: Niklas Tittjung <nik_t.01@web.de>
| * Convert a synapse.events to async/await. (#7949)Patrick Cloke2020-07-271-1/+1
| |
* | Add ratelimiting on joinsErik Johnston2020-07-311-2/+35
|/
* Remove hacky error handling for inlineDeferreds. (#7950)Patrick Cloke2020-07-272-21/+12
|
* Convert state resolution to async/await (#7942)Patrick Cloke2020-07-241-2/+2
|
* Fix up types and comments that refer to Deferreds. (#7945)Patrick Cloke2020-07-247-157/+172
|
* Convert presence handler helpers to async/await. (#7939)Patrick Cloke2020-07-231-23/+20
|
* Update the auth providers to be async. (#7935)Patrick Cloke2020-07-232-19/+23
|
* Follow-up to admin API to re-activate accounts (#7908)Patrick Cloke2020-07-221-4/+18
|
* Convert the message handler to async/await. (#7884)Patrick Cloke2020-07-221-136/+152
|
* Add debugging to sync response generation (#7929)Richard van der Hoff2020-07-221-2/+15
|
* Convert room list handler to async/await. (#7912)Patrick Cloke2020-07-211-33/+29
|
* Fix deprecation warning: import ABC from collections.abc (#7892)Karthikeyan Singaravelan2020-07-201-1/+1
|
* Fix TypeError in synapse.notifier (#7880)Erik Johnston2020-07-171-0/+8
| | | Fixes #7774
* Convert device handler to async/await (#7871)Patrick Cloke2020-07-171-136/+105
|
* Convert _base, profile, and _receipts handlers to async/await (#7860)Patrick Cloke2020-07-174-53/+41
|
* Reject attempts to join empty rooms over federation (#7859)Richard van der Hoff2020-07-161-2/+13
| | | | | | We shouldn't allow others to make_join through us if we've left the room; reject such attempts with a 404. Fixes #7835. Fixes #6958.
* Allow moving typing off master (#7869)Erik Johnston2020-07-161-74/+167
|
* Merge pull request #7866 from matrix-org/rav/fix_guest_user_idRichard van der Hoff2020-07-161-21/+1
|\ | | | | Fix guest user registration with lots of client readers
| * Use a postgres sequence to generate guest user IDsRichard van der Hoff2020-07-161-21/+1
| |
* | Add some tiny type annotations (#7870)Richard van der Hoff2020-07-161-6/+4
| | | | | | I found these made pycharm have more of a clue as to what was going on in other places.
* | Ensure that calls to `json.dumps` are compatible with the standard library ↵Patrick Cloke2020-07-151-1/+2
| | | | | | | | json. (#7836)
* | Merge branch 'erikj/faster_typing' of github.com:matrix-org/synapse into developErik Johnston2020-07-151-2/+2
|\ \ | |/ |/|
| * Fix typoErik Johnston2020-07-151-1/+1
| |
| * Use get_users_in_room rather than state handler in typing for speedErik Johnston2020-07-151-2/+2
| |
* | Allow accounts to be re-activated from the admin APIs. (#7847)Patrick Cloke2020-07-151-20/+28
|/
* Convert E2E key and room key handlers to async/await. (#7851)Patrick Cloke2020-07-152-124/+98
|
* Add delete room admin endpoint (#7613)Dirk Klimpel2020-07-141-2/+206
| | | | | | | | | | | | | | | | | | The Delete Room admin API allows server admins to remove rooms from server and block these rooms. `DELETE /_synapse/admin/v1/rooms/<room_id>` It is a combination and improvement of "[Shutdown room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/shutdown_room.md)" and "[Purge room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/purge_room.md)" API. Fixes: #6425 It also fixes a bug in [synapse/storage/data_stores/main/room.py](synapse/storage/data_stores/main/room.py) in ` get_room_with_stats`. It should return `None` if the room is unknown. But it returns an `IndexError`. https://github.com/matrix-org/synapse/blob/901b1fa561e3cc661d78aa96d59802cf2078cb0d/synapse/storage/data_stores/main/room.py#L99-L105 Related to: - #5575 - https://github.com/Awesome-Technologies/synapse-admin/issues/17 Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Support handling registration requests across multiple client readers. (#7830)Patrick Cloke2020-07-131-1/+2
|
* Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)Patrick Cloke2020-07-101-1/+1
|
* Fix resync remote devices on receive PDU in worker mode. (#7815)Erik Johnston2020-07-101-8/+19
| | | | | | The replication client requires that arguments are given as keyword arguments, which was not done in this case. We also pull out the logic so that we can catch and handle any exceptions raised, rather than leaving them unhandled.
* Fix recursion error when fetching auth chain over federation (#7817)Erik Johnston2020-07-101-12/+37
| | | | | | | | | | | | | | | When fetching the state of a room over federation we receive the event IDs of the state and auth chain. We then fetch those events that we don't already have. However, we used a function that recursively fetched any missing auth events for the fetched events, which can lead to a lot of recursion if the server is missing most of the auth chain. This work is entirely pointless because would have queued up the missing events in the auth chain to be fetched already. Let's just diable the recursion, since it only gets called from one place anyway.
* `update_membership` declaration: now always returns an event id. (#7809)Richard van der Hoff2020-07-092-5/+5
|
* Fix `can only concatenate list (not "tuple") to list` exception (#7810)Richard van der Hoff2020-07-091-1/+1
| | | It seems auth_events can be either a list or a tuple, depending on Things.
* Generate real events when we reject invites (#7804)Richard van der Hoff2020-07-093-76/+158
| | | | | | | | Fixes #2181. The basic premise is that, when we fail to reject an invite via the remote server, we can generate our own out-of-band leave event and persist it as an outlier, so that we have something to send to the client.
* Add `HomeServer.signing_key` property (#7805)Richard van der Hoff2020-07-082-2/+2
| | | ... instead of duplicating `config.signing_key[0]` everywhere
* Stop passing bytes when dumping JSON (#7799)Patrick Cloke2020-07-081-2/+2
|
* Refactor getting replication updates from database v2. (#7740)Erik Johnston2020-07-071-0/+3
|
* Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-42/+32
|
* isort 5 compatibility (#7786)Will Hunt2020-07-052-4/+2
| | | The CI appears to use the latest version of isort, which is a problem when isort gets a major version bump. Rather than try to pin the version, I've done the necessary to make isort5 happy with synapse.
* Fix inconsistent handling of upper and lower cases of email addresses. (#7021)Dirk Klimpel2020-07-031-2/+3
| | | fixes #7016
* Merge tag 'v1.16.0rc2' into developPatrick Cloke2020-07-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.16.0rc2 (2020-07-02) ============================== Synapse 1.16.0rc2 includes the security fixes released with Synapse 1.15.2. Please see [below](https://github.com/matrix-org/synapse/blob/master/CHANGES.md#synapse-1152-2020-07-02) for more details. Improved Documentation ---------------------- - Update postgres image in example `docker-compose.yaml` to tag `12-alpine`. ([\#7696](https://github.com/matrix-org/synapse/issues/7696)) Internal Changes ---------------- - Add some metrics for inbound and outbound federation latencies: `synapse_federation_server_pdu_process_time` and `synapse_event_processing_lag_by_event`. ([\#7771](https://github.com/matrix-org/synapse/issues/7771))
| * Merge branch 'master' into release-v1.16.0Patrick Cloke2020-07-023-35/+14
| |\
| * | Fix new metric where we used ms instead of seconds (#7771)Erik Johnston2020-07-011-1/+1
| | | | | | | | | | | | Introduced in #7755, not yet released.
* | | Merge branch 'master' into developPatrick Cloke2020-07-023-35/+14
|\ \ \ | | |/ | |/|
| * | Correctly handle outliers as prev events over federationErik Johnston2020-07-021-3/+3
| | |
| * | Ensure that HTML pages served from Synapse include headers to avoid embedding.Patrick Cloke2020-07-022-32/+11
| | |
* | | Add early returns to `_check_for_soft_fail` (#7769)Richard van der Hoff2020-07-011-64/+55
| | | | | | | | | | | | my editor was complaining about unset variables, so let's add some early returns to fix that and reduce indentation/cognitive load.
* | | Type checking for `FederationHandler` (#7770)Richard van der Hoff2020-07-011-17/+30
| |/ |/| | | fix a few things to make this pass mypy.
* | Back out MSC2625 implementation (#7761)Brendan Abolivier2020-07-011-3/+0
| |
* | Additional configuration options for auto-join rooms (#7763)Patrick Cloke2020-06-301-62/+168
| |
* | Add some metrics for inbound and outbound federation processing times (#7755)Erik Johnston2020-06-301-0/+6
| |
* | Yield during large v2 state res. (#7735)Erik Johnston2020-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | State res v2 across large data sets can be very CPU intensive, and if all the relevant events are in the cache the algorithm will run from start to finish within a single reactor tick. This can result in blocking the reactor tick for several seconds, which can have major repercussions on other requests. To fix this we simply add the occaisonal `sleep(0)` during iterations to yield execution until the next reactor tick. The aim is to only do this for large data sets so that we don't impact otherwise quick resolutions.=
* | Convert directory handler to async/await (#7727)Patrick Cloke2020-06-222-40/+32
| |
* | Convert the typing handler to async/await. (#7679)Patrick Cloke2020-06-171-18/+11
| |
* | Implement unread counter (MSC2625) (#7673)Brendan Abolivier2020-06-171-0/+3
|\ \ | | | | | | Implementation of https://github.com/matrix-org/matrix-doc/pull/2625
| * \ Merge branch 'develop' into babolivier/mark_unreadBrendan Abolivier2020-06-1514-82/+60
| |\ \
| * \ \ Merge branch 'develop' into babolivier/mark_unreadBrendan Abolivier2020-06-152-29/+57
| |\ \ \
| * | | | Appease mypyBrendan Abolivier2020-06-101-1/+1
| | | | |
| * | | | LintBrendan Abolivier2020-06-101-3/+3
| | | | |
| * | | | Use temporary prefixes as per the MSCBrendan Abolivier2020-06-101-1/+3
| | | | |
| * | | | Add a new unread_counter to sync responsesBrendan Abolivier2020-06-101-0/+1
| | |_|/ | |/| |
* | | | Refactor getting replication updates from database. (#7636)Erik Johnston2020-06-162-11/+58
| | | | | | | | | | | | The aim here is to make it easier to reason about when streams are limited and when they're not, by moving the logic into the database functions themselves. This should mean we can kill of `db_query_to_update_function` function.
* | | | Replace all remaining six usage with native Python 3 equivalents (#7704)Dagfinn Ilmari Mannsåker2020-06-166-22/+13
| | | |
* | | | Convert the device message and pagination handlers to async/await. (#7678)Patrick Cloke2020-06-162-31/+18
| | | |
* | | | Ensure etag is a string for GET room_keys/version response (#7691)Hubert Chathi2020-06-151-0/+1
| | | |
* | | | Fix "There was no active span when trying to log." error (#7698)Erik Johnston2020-06-151-0/+1
| |_|/ |/| |
* | | Replace iteritems/itervalues/iterkeys with native versions. (#7692)Patrick Cloke2020-06-1513-81/+59
| | |
* | | Fix a typo when comparing the URI & method during UI Auth. (#7689)Patrick Cloke2020-06-121-1/+1
| |/ |/|
* | Add option to enable encryption by default for new rooms (#7639)Andrew Morgan2020-06-102-29/+57
|/ | | | | | | | | Fixes https://github.com/matrix-org/synapse/issues/2431 Adds config option `encryption_enabled_by_default_for_room_type`, which determines whether encryption should be enabled with the default encryption algorithm in private or public rooms upon creation. Whether the room is private or public is decided based upon the room creation preset that is used. Part of this PR is also pulling out all of the individual instances of `m.megolm.v1.aes-sha2` into a constant variable to eliminate typos ala https://github.com/matrix-org/synapse/pull/7637 Based on #7637
* Convert the registration handler to async/await. (#7649)Patrick Cloke2020-06-081-66/+41
|
* Convert user directory handler and related classes to async/await. (#7640)Patrick Cloke2020-06-054-107/+73
|
* Add an option to disable autojoin for guest accounts (#6637)Travis Ralston2020-06-051-1/+7
| | | | Fixes https://github.com/matrix-org/synapse/issues/3177
* Typo fixes.Patrick Cloke2020-06-051-1/+1
|
* Allow new users to be registered via the admin API even if the monthly ↵Dirk Klimpel2020-06-051-1/+6
| | | | active user limit has been reached (#7263)
* Performance improvements and refactor of Ratelimiter (#7595)Andrew Morgan2020-06-054-56/+38
| | | | | | | | | | While working on https://github.com/matrix-org/synapse/issues/5665 I found myself digging into the `Ratelimiter` class and seeing that it was both: * Rather undocumented, and * causing a *lot* of config checks This PR attempts to refactor and comment the `Ratelimiter` class, as well as encourage config file accesses to only be done at instantiation. Best to be reviewed commit-by-commit.
* Cleanups to the OpenID Connect integration (#7628)Richard van der Hoff2020-06-031-7/+20
| | | | docs, default configs, comments. Nothing very significant.
* Check if the localpart is reserved for guests earlier in the registration ↵Brendan Abolivier2020-06-031-9/+9
| | | | | flow (#7625) This is so the user is warned about the username not being valid as soon as possible, rather than only once they've finished UIA.
* Fix exceptions when fetching events from a down host. (#7622)Erik Johnston2020-06-031-1/+1
| | | We already caught some exceptions, but not all.
* Clean up exception handling in SAML2ResponseResource (#7614)Richard van der Hoff2020-06-031-30/+11
| | | | | | | | | | | | | * Expose `return_html_error`, and allow it to take a Jinja2 template instead of a raw string * Clean up exception handling in SAML2ResponseResource * use the existing code in `return_html_error` instead of re-implementing it (giving it a jinja2 template rather than inventing a new form of template) * do the exception-catching in the REST layer rather than in the handler layer, to make sure we catch all exceptions.
* Process cross-signing keys when resyncing device lists (#7594)Brendan Abolivier2020-06-012-18/+62
| | | It looks like `user_device_resync` was ignoring cross-signing keys from the results received from the remote server. This patch fixes this, by processing these keys using the same process `_handle_signing_key_updates` does (and effectively factor that part out of that function).
* Convert groups local and server to async/await. (#7600)Patrick Cloke2020-06-011-47/+35
|
* Don't fail all of an iteration of the device list retry loop on error (#7609)Brendan Abolivier2020-06-011-15/+21
| | | Without this patch, if an error happens which isn't caught by `user_device_resync`, then `_maybe_retry_device_resync` would fail, without retrying the next users in the iteration. This patch fixes this so that it now only logs an error in this case.
* Fix 'FederationGroupsRoomsServlet' API when group has room server is not in. ↵Erik Johnston2020-05-291-8/+12
| | | | (#7599)
* allow emails to be passed through SAML (#7385)Christopher Cooper2020-05-271-2/+10
| | | Signed-off-by: Christopher Cooper <cooperc@ocf.berkeley.edu>
* Convert identity handler to async/await. (#7561)Patrick Cloke2020-05-262-63/+46
|
* Optimise some references to hs.config (#7546)Richard van der Hoff2020-05-221-3/+5
| | | These are surprisingly expensive, and we only really need to do them at startup.
* Add option to move event persistence off master (#7517)Erik Johnston2020-05-225-19/+61
|
* Add ability to wait for replication streams (#7542)Erik Johnston2020-05-225-70/+140
| | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
* Convert sending mail to async/await. (#7557)Erik Johnston2020-05-221-5/+4
| | | | Mainly because sometimes the email push code raises exceptions where the stack traces have gotten lost, which is hopefully fixed by this.
* On upgrade room only send canonical alias once. (#7547)Erik Johnston2020-05-221-55/+60
| | | | | | | | Instead of doing a complicated dance of deleting and moving aliases one by one, which sends a canonical alias update into the old room for each one, lets do it all in one go. This also changes the function to move *all* local alias events to the new room, however that happens later on anyway.
* Fix exception reporting due to HTTP request errors. (#7556)Erik Johnston2020-05-221-0/+7
| | | | These are business as usual errors, rather than stuff we want to log at error.
* Retry to sync out of sync device lists (#7453)Brendan Abolivier2020-05-211-7/+73
| | | | | | | | | | | When a call to `user_device_resync` fails, we don't currently mark the remote user's device list as out of sync, nor do we retry to sync it. https://github.com/matrix-org/synapse/pull/6776 introduced some code infrastructure to mark device lists as stale/out of sync. This commit uses that code infrastructure to mark device lists as out of sync if processing an incoming device list update makes the device handler realise that the device list is out of sync, but we can't resync right now. It also adds a looping call to retry all failed resync every 30s. This shouldn't cause too much spam in the logs as this commit also removes the "Failed to handle device list update for..." warning logs when catching `NotRetryingDestination`. Fixes #7418
* Hash passwords earlier in the password reset process (#7538)Patrick Cloke2020-05-201-4/+1
| | | | This now matches the logic of the registration process as modified in 56db0b1365965c02ff539193e26c333b7f70d101 / #7523.
* Omit displayname or avatar_url if they aren't set instead of returning null ↵Aaron Raimist2020-05-191-2/+6
| | | | | | | | | (#7497) Per https://github.com/matrix-org/matrix-doc/issues/1436#issuecomment-410089470 they should be omitted instead of returning null or "". They aren't marked as required in the spec. Fixes https://github.com/matrix-org/synapse/issues/7333 Signed-off-by: Aaron Raimist <aaron@raim.ist>
* Merge tag 'v1.13.0rc3' into developPatrick Cloke2020-05-181-7/+2
|\ | | | | | | | | | | | | | | Synapse 1.13.0rc3 (2020-05-18) Bugfixes: - Hash passwords as early as possible during registration. #7523
| * Hash passwords earlier in the registration process (#7523)Patrick Cloke2020-05-181-7/+2
| |
* | Add type hints to room member handlers (#7513)Patrick Cloke2020-05-152-139/+173
| |
* | Support UI Authentication for OpenID Connect accounts (#7457)Patrick Cloke2020-05-152-20/+60
| |
* | Update the room member handler to use async/await. (#7507)Patrick Cloke2020-05-152-74/+58
| |
* | Ignore incoming presence updates when presence is disabled (#7508)Andrew Morgan2020-05-151-2/+4
| |
* | Merge tag 'v1.13.0rc2' into developRichard van der Hoff2020-05-141-19/+18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synapse 1.13.0rc2 (2020-05-14) ============================== Bugfixes -------- - Fix a long-standing bug which could cause messages not to be sent over federation, when state events with state keys matching user IDs (such as custom user statuses) were received. ([\#7376](https://github.com/matrix-org/synapse/issues/7376)) - Restore compatibility with non-compliant clients during the user interactive authentication process, fixing a problem introduced in v1.13.0rc1. ([\#7483](https://github.com/matrix-org/synapse/issues/7483)) Internal Changes ---------------- - Fix linting errors in new version of Flake8. ([\#7470](https://github.com/matrix-org/synapse/issues/7470))
| * Do not validate that the client dict is stable during UI Auth. (#7483)Patrick Cloke2020-05-131-19/+18
| | | | | | | | This backs out some of the validation for the client dictionary and logs if this changes during a user interactive authentication session instead.
* | Allow censoring of events to happen on workers. (#7492)Erik Johnston2020-05-131-2/+0
| | | | | | This is safe as we can now write to cache invalidation stream on workers, and is required for when we move event persistence off master.
* | Convert federation handler to async/await. (#7459)Patrick Cloke2020-05-112-21/+16
| |
* | Convert search code to async/await. (#7460)Patrick Cloke2020-05-111-24/+20
| |
* | Merge branch 'release-v1.13.0' into developAndrew Morgan2020-05-111-14/+40
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * release-v1.13.0: Don't UPGRADE database rows RST indenting Put rollback instructions in upgrade notes Fix changelog typo Oh yeah, RST Absolute URL it is then Fix upgrade notes link Provide summary of upgrade issues in changelog. Fix ) Move next version notes from changelog to upgrade notes Changelog fixes 1.13.0rc1 Documentation on setting up redis (#7446) Rework UI Auth session validation for registration (#7455) Fix errors from malformed log line (#7454) Drop support for redis.dbid (#7450)
| * Rework UI Auth session validation for registration (#7455)Patrick Cloke2020-05-081-14/+40
| | | | | | | | Be less strict about validation of UI authentication sessions during registration to match client expecations.
* | Implement OpenID Connect-based login (#7256)Quentin Gliech2020-05-082-2/+1000
| |
* | Merge branch 'release-v1.13.0' into developBrendan Abolivier2020-05-071-1/+3
|\|
| * Add a configuration setting for the dummy event threshold (#7422)Brendan Abolivier2020-05-071-1/+3
| | | | | | Add dummy_events_threshold which allows configuring the number of forward extremities a room needs for Synapse to send forward extremities in it.
* | Add more type hints to SAML handler. (#7445)Patrick Cloke2020-05-071-12/+16
| |
* | Merge branch 'release-v1.13.0' into developRichard van der Hoff2020-05-061-4/+8
|\|
| * Merge branch 'release-v1.13.0' into erikj/faster_device_lists_fetchRichard van der Hoff2020-05-059-281/+250
| |\
| * | Speed up fetching device lists changes in sync.Erik Johnston2020-05-051-4/+8
| | | | | | | | | | | | | | | Currently we copy `users_who_share_room` needlessly about three times, which is expensive when the set is large (which it can easily be).
* | | Convert the room handler to async/await. (#7396)Patrick Cloke2020-05-041-24/+18
| |/ |/|
* | async/await is_server_admin (#7363)Andrew Morgan2020-05-019-281/+250
|/
* Persist user interactive authentication sessions (#7302)Patrick Cloke2020-04-303-116/+63
| | | | | By persisting the user interactive authentication sessions to the database, this fixes situations where a user hits different works throughout their auth session and also allows sessions to persist through restarts of Synapse.
* Apply federation check for /publicRooms with filter list (#7367)Andrew Morgan2020-04-301-1/+5
|
* Convert some of the federation handler methods to async/await. (#7338)Patrick Cloke2020-04-241-25/+24
|
* Stop the master relaying USER_SYNC for other workers (#7318)Richard van der Hoff2020-04-223-105/+135
| | | | | | | Long story short: if we're handling presence on the current worker, we shouldn't be sending USER_SYNC commands over replication. In an attempt to figure out what is going on here, I ended up refactoring some bits of the presencehandler code, so the first 4 commits here are non-functional refactors to move this code slightly closer to sanity. (There's still plenty to do here :/). Suggest reviewing individual commits. Fixes (I hope) #7257.
* Merge branch 'release-v1.12.4' into developRichard van der Hoff2020-04-221-9/+139
|\
| * Query missing cross-signing keys on local sig upload (#7289)Andrew Morgan2020-04-221-9/+139
| |
* | import urllib.parse when using urllib.parse.quote (#7319)Andrew Morgan2020-04-221-1/+1
| |
* | Merge branch 'release-v1.12.4' into developRichard van der Hoff2020-04-201-129/+9
|\|