- Nov 10, 2021
-
-
Richard van der Hoff authored
as of #11012, these parameters are unused.
-
- Sep 28, 2021
-
-
Richard van der Hoff authored
* Inline `_check_event_auth` for outliers When we are persisting an outlier, most of `_check_event_auth` is redundant: * `_update_auth_events_and_context_for_auth` does nothing, because the `input_auth_events` are (now) exactly the event's auth_events, which means that `missing_auth` is empty. * we don't care about soft-fail, kicking guest users or `send_on_behalf_of` for outliers ... so the only thing that matters is the auth itself, so let's just do that. * `_auth_and_persist_fetched_events_inner`: de-async `prep` `prep` no longer calls any `async` methods, so let's make it synchronous. * Simplify `_check_event_auth` We no longer need to support outliers here, which makes things rather simpler. * changelog * lint
-
- Sep 08, 2021
-
-
Richard van der Hoff authored
This is only called in two places, and the code seems much clearer without it.
-
- Aug 26, 2021
-
-
Richard van der Hoff authored
The idea here is to take anything to do with incoming events and move it out to a separate handler, as a way of making FederationHandler smaller.
-
- Aug 19, 2021
-
-
Richard van der Hoff authored
Here we split on_receive_pdu into two functions (on_receive_pdu and process_pulled_event), rather than having both cases in the same method. There's a tiny bit of overlap, but not that much.
-
- Aug 06, 2021
-
-
Richard van der Hoff authored
* drop old-room hack pretty sure we don't need this any more. * Remove incorrect comment about modifying `context` It doesn't look like the supplied context is ever modified. * Stop `_auth_and_persist_event` modifying its parameters This is only called in three places. Two of them don't pass `auth_events`, and the third doesn't use the dict after passing it in, so this should be non-functional. * Stop `_check_event_auth` modifying its parameters `_check_event_auth` is only called in three places. `on_send_membership_event` doesn't pass an `auth_events`, and `prep` and `_auth_and_persist_event` do not use the map after passing it in. * Stop `_update_auth_events_and_context_for_auth` modifying its parameters Return the updated auth event dict, rather than modifying the parameter. This is only called from `_check_event_auth`. * Improve documentation on `_auth_and_persist_event` Rename `auth_events` parameter to better reflect what it contains. * Improve documentation on `_NewEventInfo` * Improve documentation on `_check_event_auth` rename `auth_events` parameter to better describe what it contains * changelog
-
- Apr 20, 2021
-
-
Patrick Cloke authored
As far as I can tell our logging contexts are meant to log the request ID, or sometimes the request ID followed by a suffix (this is generally stored in the name field of LoggingContext). There's also code to log the name@memory location, but I'm not sure this is ever used. This simplifies the code paths to require every logging context to have a name and use that in logging. For sub-contexts (created via nested_logging_contexts, defer_to_threadpool, Measure) we use the current context's str (which becomes their name or the string "sentinel") and then potentially modify that (e.g. add a suffix).
-
- Apr 14, 2021
-
-
Patrick Cloke authored
This refactoring allows adding logic that uses the event context before persisting it.
-
Patrick Cloke authored
This reverts commit cc51aaaa. The PR was prematurely merged and not yet approved.
-
Patrick Cloke authored
When receiving a /send_join request for a room with join rules set to 'restricted', check if the user is a member of the spaces defined in the 'allow' key of the join rules. This only applies to an experimental room version, as defined in MSC3083.
-
Jonathan de Jong authored
Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by:
Jonathan de Jong <jonathan@automatia.nl>`>
-
- Apr 09, 2021
-
-
Patrick Cloke authored
-
- Dec 14, 2020
-
-
Patrick Cloke authored
-
- Dec 02, 2020
-
-
Patrick Cloke authored
Replaces the `federation_ip_range_blacklist` configuration setting with an `ip_range_blacklist` setting with wider scope. It now applies to: * Federation * Identity servers * Push notifications * Checking key validitity for third-party invite events The old `federation_ip_range_blacklist` setting is still honored if present, but with reduced scope (it only applies to federation and identity servers).
-
- Oct 22, 2020
-
-
Erik Johnston authored
-
- Oct 09, 2020
-
-
Patrick Cloke authored
All handlers now available via get_*_handler() methods on the HomeServer.
-
- Aug 27, 2020
-
-
Patrick Cloke authored
-
- Aug 14, 2020
-
-
Patrick Cloke authored
-
- Aug 12, 2020
-
-
Patrick Cloke authored
-
- Jul 30, 2020
-
-
Patrick Cloke authored
-
- Jul 17, 2020
-
-
Patrick Cloke authored
-
- Jun 10, 2020
-
-
Andrew Morgan authored
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
-
- Jun 01, 2020
-
-
Brendan Abolivier authored
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).
-
- May 22, 2020
-
-
Erik Johnston authored
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.
-
- May 21, 2020
-
-
Brendan Abolivier authored
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
-
- May 01, 2020
-
-
Andrew Morgan authored
-
- Feb 07, 2020
-
-
Richard van der Hoff authored
... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
-
- Dec 11, 2019
-
-
Richard van der Hoff authored
and associated functions: * on_receive_pdu * handle_queued_pdus * get_missing_events_for_pdu
-
- Dec 06, 2019
-
-
Erik Johnston authored
-
- Nov 01, 2019
-
-
Richard van der Hoff authored
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.
-
- Oct 30, 2019
-
-
Erik Johnston authored
-
- Jul 03, 2019
-
-
Amber Brown authored
-
- May 10, 2019
-
-
Amber Brown authored
-
- Nov 19, 2018
-
-
Richard van der Hoff authored
-
- Nov 02, 2018
-
-
Erik Johnston authored
This is in preparation to refactor FrozenEvent to support different event formats for different room versions
-
- Sep 27, 2018
-
-
Richard van der Hoff authored
This test didn't do what it claimed to do, and what it claimed to do was the same as test_cant_hide_direct_ancestors anyway. This stuff is tested by sytest anyway.
-
Richard van der Hoff authored
when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines.
-
- Aug 13, 2018
-
-
Amber Brown authored
-
- Jul 21, 2018
-
-
Amber Brown authored
-
- Jul 09, 2018
-
-
Amber Brown authored
-