Skip to content
Snippets Groups Projects
  1. Apr 14, 2023
  2. Apr 13, 2023
  3. Apr 12, 2023
  4. Apr 11, 2023
  5. Apr 10, 2023
  6. Apr 06, 2023
  7. Apr 05, 2023
  8. Apr 04, 2023
    • Shay's avatar
    • Erik Johnston's avatar
    • Erik Johnston's avatar
      1.81.0rc1 · 735e4d1f
      Erik Johnston authored
      735e4d1f
    • Erik Johnston's avatar
    • Sean Quah's avatar
      Fix a rare bug where initial /syncs would fail (#15383) · 89a71e73
      Sean Quah authored
      
      This change fixes a rare bug where initial /syncs would fail with a
      `KeyError` under the following circumstances:
       1. A user fast joins a remote room.
       2. The user is kicked from the room before the room's full state has
          been synced.
       3. A second local user fast joins the room.
       4. Events are backfilled into the room with a higher topological
          ordering than the original user's leave. They are assigned a
          negative stream ordering. It's not clear how backfill happened here,
          since it is expected to be equivalent to syncing the full state.
       5. The second local user leaves the room before the room's full state
          has been synced. The homeserver does not complete the sync.
       6. The original user performs an initial /sync with lazy_load_members
          enabled.
           * Because they were kicked from the room, the room is included in
             the /sync response even though the include_leave option is not
             specified.
           * To populate the room's timeline, `_load_filtered_recents` /
             `get_recent_events_for_room` fetches events with a lower stream
             ordering than the leave event and picks the ones with the highest
             topological orderings (which are most recent). This captures the
             backfilled events after the leave, since they have a negative
             stream ordering. These events are filtered out of the timeline,
             since the user was not in the room at the time and cannot view
             them. The sync code ends up with an empty timeline for the room
             that notably does not include the user's leave event.
             This seems buggy, but at least we don't disclose events the user
             isn't allowed to see.
           * Normally, `compute_state_delta` would fetch the state at the
             start and end of the room's timeline to generate the sync
             response. Since the timeline is empty, it fetches the state at
             `min(now, last event in the room)`, which corresponds with the
             second user's leave. The state during the entirety of the second
             user's membership does not include the membership for the first
             user because of partial state.
             This part is also questionable, since we are fetching state from
             outside the bounds of the user's membership.
           * `compute_state_delta` then tries and fails to find the user's
             membership in the auth events of timeline events. Because there
             is no timeline event whose auth events are expected to contain
             the user's membership, a `KeyError` is raised.
      
      Also contains a drive-by fix for a separate unlikely race condition.
      
      Signed-off-by: default avatarSean Quah <seanq@matrix.org>
      89a71e73
    • David Robertson's avatar
      Note that Synapse 1.74 queued a user dir rebuild (#15386) · c0772b44
      David Robertson authored
      * Note that Synapse 1.74 queued a user dir rebuild
      
      * Changelog
      c0772b44
  9. Apr 03, 2023
    • Sean Quah's avatar
    • Patrick Cloke's avatar
      Call appservices on modern paths, falling back to legacy paths. (#15317) · cf2f2934
      Patrick Cloke authored
      This uses the specced /_matrix/app/v1/... paths instead of the
      "legacy" paths. If the homeserver receives an error it will retry
      using the legacy path.
      cf2f2934
    • Jason Little's avatar
      Experimental Unix socket support (#15353) · 56efa9b1
      Jason Little authored
      * Add IReactorUNIX to ISynapseReactor type hint.
      
      * Create listen_unix().
      
      Two options, 'path' to the file and 'mode' of permissions(not umask, recommend 666 as default as
      nginx/other reverse proxies write to it and it's setup as user www-data)
      
      For the moment, leave the option to always create a PID lockfile turned on by default
      
      * Create UnixListenerConfig and wire it up.
      
      Rename ListenerConfig to TCPListenerConfig, then Union them together into ListenerConfig.
      This spidered around a bit, but I think I got it all. Metrics and manhole have been placed
      behind a conditional in case of accidental putting them onto a unix socket.
      
      Use new helpers to get if a listener is configured for TLS, and to help create a site tag
      for logging.
      
      There are 2 TODO things in parse_listener_def() to finish up at a later point.
      
      * Refactor SynapseRequest to handle logging correctly when using a unix socket.
      
      This prevents an exception when an IP address can not be retrieved for a request.
      
      * Make the 'Synapse now listening on Unix socket' log line a little prettier.
      
      * No silent failures on generic workers when trying to use a unix socket with metrics or manhole.
      
      * Inline variables in app/_base.py
      
      * Update docstring for listen_unix() to remove reference to a hardcoded permission of 0o666 and add a few comments saying where the default IS declared.
      
      * Disallow both a unix socket and a ip/port combo on the same listener resource
      
      * Linting
      
      * Changelog
      
      * review: simplify how listen_unix returns(and get rid of a type: ignore)
      
      * review: fix typo from ConfigError in app/homeserver.py
      
      * review: roll conditional for http_options.tag into get_site_tag() helper(and add docstring)
      
      * review: enhance the conditionals for checking if a port or path is valid, remove a TODO line
      
      * review: Try updating comment in get_client_ip_if_available to clarify what is being retrieved and why
      
      * Pretty up how 'Synapse now listening on Unix Socket' looks by decoding the byte string.
      
      * review: In parse_listener_def(), raise ConfigError if neither socket_path nor port is declared(and fix a typo)
      56efa9b1
    • dependabot[bot]'s avatar
      Bump serde_json from 1.0.94 to 1.0.95 (#15371) · 9b2ab506
      dependabot[bot] authored
      * Bump serde_json from 1.0.94 to 1.0.95
      
      Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.94 to 1.0.95.
      - [Release notes](https://github.com/serde-rs/json/releases)
      - [Commits](https://github.com/serde-rs/json/compare/v1.0.94...v1.0.95
      
      )
      
      ---
      updated-dependencies:
      - dependency-name: serde_json
        dependency-type: direct:production
        update-type: version-update:semver-patch
      ...
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      
      * Changelog
      
      ---------
      
      Signed-off-by: default avatardependabot[bot] <support@github.com>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      Co-authored-by: default avatarGitHub Actions <github-actions[bot]@users.noreply.github.com>
      9b2ab506
Loading