Skip to content
Snippets Groups Projects
  1. Nov 10, 2021
  2. Sep 28, 2021
    • Richard van der Hoff's avatar
      Inline `_check_event_auth` for outliers (#10926) · 2622b28c
      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
      2622b28c
  3. Sep 08, 2021
  4. Aug 26, 2021
  5. Aug 19, 2021
  6. Aug 06, 2021
    • Richard van der Hoff's avatar
      Clean up federation event auth code (#10539) · 1bebc0b7
      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
      1bebc0b7
  7. Apr 20, 2021
    • Patrick Cloke's avatar
      Always use the name as the log ID. (#9829) · b076bc27
      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).
      b076bc27
  8. Apr 14, 2021
  9. Apr 09, 2021
  10. Dec 14, 2020
  11. Dec 02, 2020
    • Patrick Cloke's avatar
      Apply an IP range blacklist to push and key revocation requests. (#8821) · 30fba621
      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).
      30fba621
  12. Oct 22, 2020
  13. Oct 09, 2020
  14. Aug 27, 2020
  15. Aug 14, 2020
  16. Aug 12, 2020
  17. Jul 30, 2020
  18. Jul 17, 2020
  19. Jun 10, 2020
  20. Jun 01, 2020
    • Brendan Abolivier's avatar
      Process cross-signing keys when resyncing device lists (#7594) · 33c39ab9
      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).
      33c39ab9
  21. May 22, 2020
    • Erik Johnston's avatar
      Add ability to wait for replication streams (#7542) · 1531b214
      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.
      1531b214
  22. May 21, 2020
    • Brendan Abolivier's avatar
      Retry to sync out of sync device lists (#7453) · d1ae1015
      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 
      d1ae1015
  23. May 01, 2020
  24. Feb 07, 2020
  25. Dec 11, 2019
  26. Dec 06, 2019
  27. Nov 01, 2019
  28. Oct 30, 2019
  29. Jul 03, 2019
  30. May 10, 2019
  31. Nov 19, 2018
  32. Nov 02, 2018
  33. Sep 27, 2018
  34. Aug 13, 2018
  35. Jul 21, 2018
  36. Jul 09, 2018
Loading