summary refs log tree commit diff
path: root/changelog.d/11816.misc (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-07-301.111.1Olivier 'reivilibre4-2/+27
2024-07-30Upgrade locked dependency on Twisted to 24.7.0rc1. (#17502)reivilibre8-57/+65
I also update the tests and HTTP Proxy code to fix it for this new Twisted release. Pulls in fix for https://github.com/twisted/twisted/security/advisories/GHSA-c8m8-j448-xjx7 Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2024-07-161.111.0 v1.111.0Till Faelligen3-1/+14
2024-07-101.111.0rc2 v1.111.0rc2Quentin Gliech6-4/+24
2024-07-09Fix new media APIs when using synapse.app.media_repository (#17420)Erik Johnston3-2/+3
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-07-09Note the new federated media worker endpoints in the worker docs & upgrade ↵Andrew Morgan3-2/+5
notes (#17421)
2024-07-09Route auth'd fed media requests to media repo in Complement tests (#17422)Andrew Morgan2-0/+2
2024-07-09Fix up the changelog v1.111.0rc1Quentin Gliech2-3/+2
2024-07-09Tweak the changelog for v1.111.0rc1Quentin Gliech1-8/+7
Co-authored-by: Andrew Morgan <andrewm@element.io>
2024-07-09Fix exception when failing to talk to remote server (#17411)Erik Johnston2-1/+3
Broke in #17381
2024-07-091.111.0rc1Quentin Gliech25-25/+61
2024-07-09Fix `/versions` requests (#17410)Erik Johnston3-1/+11
We need it to work on workers and allow guest access. Broke by #17392
2024-07-09Bump ijson from 3.2.3 to 3.3.0 (#17413)dependabot[bot]1-90/+95
2024-07-09Bump pillow from 10.3.0 to 10.4.0 (#17412)dependabot[bot]1-71/+82
2024-07-08Fix bug in sliding sync when using old DB. (#17398)Erik Johnston8-212/+33
We don't necessarily have `instance_name` for old events (before we support multiple event persisters). We treat those as if the `instance_name` was "master". --------- Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
2024-07-08Add `rooms.bump_stamp` to Sliding Sync `/sync` for easier client-side ↵Eric Eastwood9-34/+295
sorting (#17395) `bump_stamp` corresponds to the `stream_ordering` of the latest `DEFAULT_BUMP_EVENT_TYPES` in the room. This helps clients sort more readily without them needing to pull in a bunch of the timeline to determine the last activity. `bump_event_types` is a thing because for example, we don't want display name changes to mark the room as unread and bump it to the top. For encrypted rooms, we just have to consider any activity as a bump because we can't see the content and the client has to figure it out for themselves. Outside of Synapse, `bump_stamp` is just a free-form counter so other implementations could use `received_ts`or `origin_server_ts` (see the [*Security considerations* section in MSC3575 about the potential pitfalls of using `origin_server_ts`](https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/sync-v3/proposals/3575-sync.md#security-considerations)). It doesn't have any guarantee about always going up. In the Synapse case, it could go down if an event was redacted/removed (or purged in cases of retention policies). In the future, we could add `bump_event_types` as [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) mentions if people need to customize the event types. --- In the Sliding Sync proxy, a similar [`timestamp` field was added](https://github.com/matrix-org/sliding-sync/pull/247) for the same purpose but the name is not obvious what it pertains to or what it's for. The `timestamp` field was also added to Ruma in https://github.com/ruma/ruma/pull/1622
2024-07-08Bump serde_json from 1.0.119 to 1.0.120 (#17408)dependabot[bot]1-2/+2
2024-07-08Bump serde from 1.0.203 to 1.0.204 (#17409)dependabot[bot]1-4/+4
2024-07-08Bump mypy-zope from 1.0.4 to 1.0.5 (#17414)dependabot[bot]1-4/+3
2024-07-08Bump pydantic from 2.7.1 to 2.8.2 (#17415)dependabot[bot]1-85/+98
2024-07-08Declare support for Matrix 1.11 (#17403)Travis Ralston2-0/+2
Previous: https://github.com/element-hq/synapse/pull/17082 Fixes https://github.com/element-hq/synapse/issues/17402 See https://github.com/element-hq/synapse/issues/17402 for context **Blocked on https://github.com/element-hq/synapse/pull/17388** (required for spec compliance)
2024-07-08MSC3861: allow overriding the introspection endpoint (#17406)Quentin Gliech3-2/+20
This makes it easier to go through an internal endpoint instead of the public facing URL when introspecting tokens, reducing latency.
2024-07-08Bump certifi from 2023.7.22 to 2024.7.4 (#17404)dependabot[bot]1-4/+4
2024-07-08Support MSC3916 by adding a federation /thumbnail endpoint and authenticated ↵Shay12-131/+585
`_matrix/client/v1/media/thumbnail` endpoint (#17388) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) added the endpoints `_matrix/federation/v1/media/thumbnail` and the authenticated `_matrix/client/v1/media/thumbnail`. This PR implements those endpoints, along with stabilizing `_matrix/client/v1/media/config` and `_matrix/client/v1/media/preview_url`. Complement tests are at https://github.com/matrix-org/complement/pull/728
2024-07-05Bump ruff from 0.3.7 to 0.5.0 (#17381)dependabot[bot]13-36/+41
2024-07-05Allow enabling sliding sync per-user (#17393)Erik Johnston7-6/+89
Based on #17392
2024-07-05Finish up work to allow per-user feature flags (#17392)Erik Johnston8-49/+189
Follows on from @H-Shay's great work at https://github.com/matrix-org/synapse/pull/15344 and MSC4026. Also enables its use for MSC3881, mainly as an easy but concrete example of how to use it.
2024-07-05Fix links to MSC3916 (#17397)Sandro2-2/+2
2024-07-05Upon deactivation, forget all of the user's rooms (#17400)Travis Ralston3-0/+27
This can help ensure that the rooms are eventually purged if the other local users also forget them. Synapse already clears some of the room information as part of the `_background_remove_left_rooms` background task, but this doesn't catch `events`, `event_json`, etc.
2024-07-05Fix links in README (#17379)Hugh Nimmo-Smith2-3/+4
I don't think this warrants a changelog? ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [ ] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-07-05Make the release script create a release branch for Complement as well (#17318)Quentin Gliech2-1/+25
2024-07-04Add `rooms.required_state` to Sliding Sync `/sync` (#17342)Eric Eastwood9-89/+1687
Also handles excluding rooms with partial state when people are asking for room membership events unless it's `$LAZY` room membership.
2024-07-04Changelog entries only get merged if they have the same content and ↵Eric Eastwood2-3/+4
extension (#17399) Changelog entries only get merged if they have the same content and extension See https://github.com/element-hq/synapse/pull/17301#discussion_r1665387218
2024-07-031.110.0 v1.110.0 github/release-v1.110 release-v1.110Devon Hudson3-1/+14
2024-07-02Add `room_types`/`not_room_types` filtering to Sliding Sync `/sync` (#17337)Eric Eastwood5-7/+248
Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-07-02Return some room data in Sliding Sync `/sync` (#17320)Eric Eastwood14-259/+3593
- Timeline events - Stripped `invite_state` Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-07-021.110.0rc3 v1.110.0rc3Devon Hudson7-5/+21
2024-07-02Limit size of presence EDUs (#17371)Erik Johnston3-11/+140
Otherwise they are unbounded. --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-07-02Support MSC3916 by adding `_matrix/client/v1/media/download` endpoint (#17365)Shay26-84/+1718
2024-07-02Fix regression when bounding future tokens (#17391)Erik Johnston3-10/+54
Fix bug added in #17386, where we accidentally used `room_key` for the receipts stream. See first commit. Reviewable commit-by-commit
2024-07-02Fix sync waiting for an invalid token from the "future" (#17386)Erik Johnston17-31/+229
Fixes https://github.com/element-hq/synapse/issues/17274, hopefully. Basically, old versions of Synapse could advance streams without persisting anything in the DB (fixed in #17229). On restart those updates would get lost, and so the position of the stream would revert to an older position. If this happened across an upgrade to a later Synapse version which included #17215, then sync could get blocked indefinitely (until the stream advanced to the position in the token). We fix this by bounding the stream positions we'll wait for to the maximum position of the underlying stream ID generator.
2024-07-02Fix sync waiting for an invalid token from the "future" (#17386)Erik Johnston17-31/+229
Fixes https://github.com/element-hq/synapse/issues/17274, hopefully. Basically, old versions of Synapse could advance streams without persisting anything in the DB (fixed in #17229). On restart those updates would get lost, and so the position of the stream would revert to an older position. If this happened across an upgrade to a later Synapse version which included #17215, then sync could get blocked indefinitely (until the stream advanced to the position in the token). We fix this by bounding the stream positions we'll wait for to the maximum position of the underlying stream ID generator.
2024-07-02Fix building debian packages on non-clean checkouts (#17390)Erik Johnston2-0/+4
If we leave the `.so` in place it causes the tests to fail, as it gets picked up (instead of the newly built .so) and so fails with mismatched GLIBC errors.
2024-07-02Fix building debian packages for sid (#17389)Erik Johnston2-0/+3
Sid now defaults to python3.12, and our pinned version of cffi (1.5.1) does not have wheels for 3.12. This installing cffi to fail as we did not have the correct libs installed to build from source.
2024-07-01Bump types-setuptools from 69.5.0.20240423 to 70.1.0.20240627 (#17380)dependabot[bot]1-3/+3
2024-07-01Bump serde_json from 1.0.117 to 1.0.119 (#17385)dependabot[bot]1-2/+2
2024-07-01Bump log from 0.4.21 to 0.4.22 (#17384)dependabot[bot]1-2/+2
2024-07-01Bump cryptography from 42.0.7 to 42.0.8 (#17382)dependabot[bot]1-33/+33
2024-07-01Limit size of presence EDUs (#17371)Erik Johnston3-11/+140
Otherwise they are unbounded. --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-06-28Clarify `url_preview_url_blacklist` is a usability feature (#17356)davidegirardi2-9/+13
2024-06-27Use rstcheck to "lint" the README (#17367)Till2-0/+21
Follow up to https://github.com/element-hq/synapse/pull/17363, so we can detect issues with the RST file early on. ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-06-27Handle multiple rows device inbox (#17362)Erik Johnston2-3/+3
Fix bug where we don't get new to-device from remote if they resent a message we've already persisted and have recorded in the DB twice. `device_federation_inbox` table doesn't have a unique index, and so we can race and store an entry in there twice. If we do so then `simple_select_one_txn` will throw an error due to the query returning more than one row. We should add an unique index, but it doesn't really matter so lets just handle the case of multiple rows correctly for now.
2024-06-261.110.0rc2 v1.110.0rc2Till Faelligen4-2/+16
2024-06-26Fix uploading packages to PyPi (#17363)Till2-7/+8
As per https://github.com/sphinx-doc/sphinx/issues/3921#issuecomment-315581557, we need double underscores. Running `rst2html README.rst > /dev/null` found some more warnings.
2024-06-26Fix uploading packages to PyPi (#17363)Till2-7/+8
As per https://github.com/sphinx-doc/sphinx/issues/3921#issuecomment-315581557, we need double underscores. Running `rst2html README.rst > /dev/null` found some more warnings.
2024-06-26Fix typo v1.110.0rc1Till Faelligen1-1/+1
2024-06-26Update changelogTill Faelligen1-8/+6
2024-06-261.110.0rc1Till Faelligen46-49/+88
2024-06-25Fixes to the table of contents in the README (#17329)Andrew Morgan2-4/+5
2024-06-25Fix outdated Security Disclosure Policy references (#17341)Denis Kasak4-5/+6
2024-06-25Re-introduce federation /download endpoint (#17350)Shay8-11/+588
2024-06-25Fix refreshable_access_token_lifetime typo (#17357)douglaz1-1/+1
Simple typo in the docs
2024-06-25Limit amount of replication we send (#17358)Erik Johnston2-8/+8
Fixes up #17333, where we failed to actually send less data (the `DISTINCT` didn't work due to `stream_id` being different). We fix this by making it so that every device list outbound poke for a given user ID has the same stream ID. We can't change the query to only return e.g. max stream ID as the receivers look up the destinations to send to by doing `SELECT WHERE stream_id = ?`
2024-06-25Reintroduce "Reduce device lists replication traffic."" (#17361)Erik Johnston6-48/+89
Reintroduces https://github.com/element-hq/synapse/pull/17333 Turns out the reason for revert was down two master instances running
2024-06-25Revert "Reduce device lists replication traffic." (#17360)Erik Johnston6-89/+48
Reverts element-hq/synapse#17333 It looks like master was still sending out replication RDATA with the old format... somehow
2024-06-24Add `is_invite` filtering to Sliding Sync `/sync` (#17335)Eric Eastwood4-43/+199
Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-06-24Correct error in user_directory docs (#17348)devonh2-1/+3
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters)) --------- Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: reivilibre <oliverw@matrix.org>
2024-06-24Add default values for rc_invites per_issuer to docs (#17347)devonh2-2/+4
A simple change to update the docs where default values were missing. ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters)) --------- Co-authored-by: Kim Brose <2803622+HarHarLinks@users.noreply.github.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-06-24Fix room `type` typo in mailer (#17336)Eric Eastwood2-2/+4
Correct event content field is `EventContentFields.ROOM_TYPE` (`type`) :white_check_mark: , not `room_type` :x: Spec: https://spec.matrix.org/v1.10/client-server-api/#mroomcreate
2024-06-24Reintroduce #17291. (#17338)Erik Johnston7-89/+250
This is #17291 (which got reverted), with some added fixups, and change so that tests actually pick up the error. The problem was that we were not calculating any new chain IDs due to a missing `not` in a condition.
2024-06-24Add support for MSC3823 - Account Suspension Part 2 (#17255)Shay9-0/+287
2024-06-24Reduce device lists replication traffic. (#17333)Erik Johnston6-48/+89
Reduce the replication traffic of device lists, by not sending every destination that needs to be sent the device list update over replication. Instead a "hosts to send to have been calculated" notification over replication, and then federation senders read the destinations from the DB. For non federation senders this should heavily reduce the impact of a user in many large rooms changing a device.
2024-06-24Tidy up integer parsing (#17339)Denis Kasak8-34/+25
The parse_integer function was previously made to reject negative values by default in https://github.com/element-hq/synapse/pull/16920, but the documentation stated otherwise. This fixes the documentation and also: - Removes explicit negative=False parameters from call sites. - Brings the negative default of parse_integer_from_args in alignment with parse_integer.
2024-06-24Bump lazy_static from 1.4.0 to 1.5.0 (#17355)dependabot[bot]1-2/+2
2024-06-24Bump typing-extensions from 4.11.0 to 4.12.2 (#17354)dependabot[bot]1-3/+3
2024-06-24Bump netaddr from 1.2.1 to 1.3.0 (#17353)dependabot[bot]1-3/+3
2024-06-24Bump packaging from 24.0 to 24.1 (#17352)dependabot[bot]1-4/+4
2024-06-24Bump sentry-sdk from 2.3.1 to 2.6.0 (#17351)dependabot[bot]1-4/+4
2024-06-21Bump urllib3 from 2.0.7 to 2.2.2 (#17346)dependabot[bot]1-5/+5
2024-06-21Bump requests from 2.31.0 to 2.32.2 (#17345)dependabot[bot]1-4/+4
2024-06-21Bump tornado from 6.4 to 6.4.1 (#17344)dependabot[bot]1-15/+15
2024-06-21Bump authlib from 1.3.0 to 1.3.1 (#17343)dependabot[bot]1-3/+3
2024-06-19Revert "Handle large chain calc better (#17291)" (#17334)Erik Johnston5-230/+82
This reverts commit bdf82efea505c488953b46eb681b5a63c4e9655d (#17291) This seems to have stopped persisting auth chains for new events, and so is causing state res to fall back to the slow methods
2024-06-19Register sliding sync under a different path (#17331)Erik Johnston3-2/+5
As the API is slightly incompatible.
2024-06-19register-new-matrix-user: add a flag to ignore already existing users (#17304)Jörg Thalheim4-3/+34
Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
2024-06-19Filter added to Admin-API GET /rooms (#17276)Alexander Fechler5-15/+131
2024-06-19Update the README with Element branding and a few fixes (#17324)Andrew Morgan2-25/+51
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
2024-06-19Remove `expire_access_token` from Docker configuration (#17198)Aaron Dewes2-1/+1
Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
2024-06-19Handle large chain calc better (#17291)Erik Johnston5-82/+230
We calculate the auth chain links outside of the main persist event transaction to ensure that we do not block other event sending during the calculation.
2024-06-19Require the 'from' parameter for `/notifications` be an integer (#17283)Andrew Morgan5-21/+173
Co-authored-by: Erik Johnston <erikj@element.io>
2024-06-18Revert "Support MSC3916 by adding a federation `/download` endpoint" (#17325)Andrew Morgan11-659/+25
2024-06-18register_new_matrix_user: add password-file flag (#17294)Jörg Thalheim4-7/+29
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Andrew Morgan <andrew@amorgan.xyz>
2024-06-18Add support for via query parameter from MSC4156 (#17322)Johannes Marbach4-0/+20
This adds support for the `via` query parameter from https://github.com/matrix-org/matrix-spec-proposals/pull/4156.
2024-06-181.109.0 v1.109.0 github/release-v1.109 release-v1.109Quentin Gliech4-2/+16
2024-06-18fix missing quotes for exclude_rooms_from_sync (#17308)Dirk Klimpel2-1/+2
We tried to configure rooms `exclude_rooms_from_sync`. If we do not quote we get an error. The example should be valid.
2024-06-18Switch to macOS 12 runners to fix building of wheels for macOS (#17319)Quentin Gliech2-4/+5
This changes the release artefacts workflow to use `macos-12` runners instead of `macos-11`, as the latter will be fully deprecated in a few days. This also updates `cibuildwheel` to a newer version, as it would not 'repair' the macOS wheels correctly The difference is that now instead of outputting a macOS 11+ compatible wheel, we output a macOS 12+ compatible one. This is fine, as macOS 11 is considered EOL since September 2023. We can also expect that macOS 12 will be considered EOL in September 2024, as Apple usually supports the last 3 macOS version, and macOS 15 is scheduled to be released around that time.
2024-06-18Bump types-pyyaml from 6.0.12.12 to 6.0.12.20240311 (#17316)dependabot[bot]1-4/+4
2024-06-18Bump docker/build-push-action from 5 to 6 (#17312)dependabot[bot]1-1/+1
2024-06-18Bump dawidd6/action-download-artifact from 5 to 6 (#17313)dependabot[bot]1-1/+1
2024-06-18Bump types-netaddr from 1.2.0.20240219 to 1.3.0.20240530 (#17314)dependabot[bot]1-3/+3
2024-06-18Bump phonenumbers from 8.13.37 to 8.13.39 (#17315)dependabot[bot]1-3/+3
2024-06-18Bump msgpack from 1.0.7 to 1.0.8 (#17317)dependabot[bot]1-57/+57
2024-06-17Add `is_encrypted` filtering to Sliding Sync `/sync` (#17281)Eric Eastwood5-100/+189
Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-06-17Add `stream_ordering` sort to Sliding Sync `/sync` (#17293)Eric Eastwood9-121/+459
Sort is no longer configurable and we always sort rooms by the `stream_ordering` of the last event in the room or the point where the user can see up to in cases of leave/ban/invite/knock.
2024-06-171.109.0rc3 v1.109.0rc3Quentin Gliech6-4/+20
2024-06-17Set our own stream position from the current sequence value on startup (#17309)Quentin Gliech3-178/+147
2024-06-17Use the release branch for sytest in release-branch PRs (#17306)Quentin Gliech2-0/+4
2024-06-14Automatically apply SQL for inconsistent sequence (#17305)Erik Johnston4-37/+25
Rather than forcing the server operator to apply the SQL manually. This should be safe, as there should be only one writer for these sequences.
2024-06-14Enable cross-signing key upload without UIA (#17284)Richard van der Hoff7-123/+32
Per MSC3967, which is now stable, we should not require UIA when uploading cross-signing keys for the first time. Fixes: #17227
2024-06-13Include user membership on events (#17282)Richard van der Hoff18-45/+8
MSC4115 has now completed FCP, so we can enable it by default and switch to the stable identifier.
2024-06-13Add `is_dm` filtering to Sliding Sync `/sync` (#17277)Eric Eastwood5-7/+416
Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync
2024-06-13Fix `newly_left` rooms not appearing if we returned early (Sliding Sync) ↵Eric Eastwood3-14/+15
(#17301) Fix `newly_left` rooms not appearing if we returned early when `membership_snapshot_token.is_before_or_eq(to_token.room_key)`. Introduced in https://github.com/element-hq/synapse/pull/17187 (part of Sliding Sync) The tests didn't catch it because they had a small typo in it `room_id1` vs `room_id2`. Found while working on https://github.com/element-hq/synapse/pull/17293
2024-06-13Add `event.internal_metadata.instance_name` (#17300)Eric Eastwood10-9/+31
Add `event.internal_metadata.instance_name` (the worker instance that persisted the event) to go alongside the existing `event.internal_metadata.stream_ordering`. `instance_name` is useful to properly compare and query for events with a token since you need to compare both the `stream_ordering` and `instance_name` against the vector clock/`instance_map` in the `RoomStreamToken`. This is pre-requisite work and may be used in https://github.com/element-hq/synapse/pull/17293 Adding `event.internal_metadata.instance_name` was first mentioned in the initial Sliding Sync PR while pairing with @erikjohnston, see https://github.com/element-hq/synapse/pull/17187/commits/09609cb0dbca3a4cfd9fbf90cc962e765ec469c0#diff-5cd773fb307aa754bd3948871ba118b1ef0303f4d72d42a2d21e38242bf4e096R405-R410
2024-06-13Fix `get_last_event_in_room_before_stream_ordering(...)` finding the wrong ↵Eric Eastwood3-12/+290
last event (#17295) PR where this was introduced: https://github.com/matrix-org/synapse/pull/14817 ### What does this affect? `get_last_event_in_room_before_stream_ordering(...)` is used in Sync v2 in a lot of different state calculations. `get_last_event_in_room_before_stream_ordering(...)` is also used in `/rooms/{roomId}/members`
2024-06-13Bump `mypy` from 1.8.0 to 1.9.0 (#17297)Andrew Morgan4-40/+82
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13Clarify that MSC4151 is enabled on matrix.org (#17296)Quentin Gliech2-1/+10
This clarifies in the comments that the MSC is being used in matrix.org See #17270
2024-06-12Add report room API (MSC4151) (#17270)Travis Ralston9-8/+210
https://github.com/matrix-org/matrix-spec-proposals/pull/4151 This is intended to be enabled by default for immediate use. When FCP is complete, the unstable endpoint will be dropped and stable endpoint supported instead - no backwards compatibility is expected for the unstable endpoint.
2024-06-12Bump types-jsonschema from 4.21.0.20240311 to 4.22.0.20240610 (#17288)dependabot[bot]1-3/+3
2024-06-12Bump jinja2 from 3.1.3 to 3.1.4 (#17287)dependabot[bot]1-3/+3
2024-06-11CHANGES.md: s/OTKs/one-time-keys/ v1.109.0rc2Quentin Gliech1-1/+1
2024-06-111.109.0rc2Quentin Gliech5-3/+17
2024-06-11Bump regex from 1.10.4 to 1.10.5 (#17290)dependabot[bot]1-2/+2
2024-06-11Bump dawidd6/action-download-artifact from 3.1.4 to 5 (#17289)dependabot[bot]1-1/+1
2024-06-11Bump types-pillow from 10.2.0.20240423 to 10.2.0.20240520 (#17285)dependabot[bot]1-3/+3
2024-06-10Reorganize Pydantic models and types used in handlers (#17279)Eric Eastwood15-244/+269
Spawning from https://github.com/element-hq/synapse/pull/17187#discussion_r1619492779 around wanting to put `SlidingSyncBody` (parse the request in the rest layer), `SlidingSyncConfig` (from the rest layer, pass to the handler), `SlidingSyncResponse` (pass the response from the handler back to the rest layer to respond) somewhere that doesn't contaminate the imports and cause circular import issues. - Moved Pydantic parsing models to `synapse/types/rest` - Moved handler types to `synapse/types/handlers`
2024-06-10Fix bug where device lists would break sync (#17292)Erik Johnston3-9/+36
If the stream ID in the unconverted table is ahead of the device lists ID gen, then it can break all /sync requests that had an ID from ahead of the table. The fix is to make sure we add the unconverted table to the list of tables we check at start up. Broke in https://github.com/element-hq/synapse/pull/17229
2024-06-10Update changelogErik Johnston1-1/+1
2024-06-10Always return OTK counts (#17275)Erik Johnston2-4/+30
Broke in https://github.com/element-hq/synapse/pull/17215
2024-06-10Wrong retention policy being used when filtering events (lint ↵Eric Eastwood2-1/+2
`ControlVarUsedAfterBlockViolation` `WPS441`) (#17272) Fix loop var being used outside block. Before this change, we were always using the last room_id's retention policy for all events being filtered. I found this bug with the [new lint rule, `ControlVarUsedAfterBlockViolation` `WPS441`](https://github.com/astral-sh/ruff/pull/11769), that I re-implemented in `ruff`. Shout-out to @reivilibre for all the help in the beginning! ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-06-07Support MSC3916 by adding a federation `/download` endpoint (#17172)Shay10-24/+659
2024-06-07Add debug logging for when room keys are uploaded, including whether they ↵reivilibre2-0/+19
are replacing other room keys. (#17266) Fixes: #17013 Add logging for whether room keys are replaced This is motivated by the Crypto team who need to diagnose crypto issues. The existing opentracing logging is not enough because it is not enabled for all users.
2024-06-06Add Sliding Sync `/sync` endpoint (initial implementation) (#17187)Eric Eastwood11-15/+2302
Based on [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575): Sliding Sync This iteration only focuses on returning the list of room IDs in the sliding window API (without sorting/filtering). Rooms appear in the Sliding sync response based on: - `invite`, `join`, `knock`, `ban` membership events - Kicks (`leave` membership events where `sender` is different from the `user_id`/`state_key`) - `newly_left` (rooms that were left during the given token range, > `from_token` and <= `to_token`) - In order for bans/kicks to not show up, you need to `/forget` those rooms. This doesn't modify the event itself though and only adds the `forgotten` flag to `room_memberships` in Synapse. There isn't a way to tell when a room was forgotten at the moment so we can't factor it into the from/to range. ### Example request `POST http://localhost:8008/_matrix/client/unstable/org.matrix.msc3575/sync` ```json { "lists": { "foo-list": { "ranges": [ [0, 99] ], "sort": [ "by_notification_level", "by_recency", "by_name" ], "required_state": [ ["m.room.join_rules", ""], ["m.room.history_visibility", ""], ["m.space.child", "*"] ], "timeline_limit": 100 } } } ``` Response: ```json { "next_pos": "s58_224_0_13_10_1_1_16_0_1", "lists": { "foo-list": { "count": 1, "ops": [ { "op": "SYNC", "range": [0, 99], "room_ids": [ "!MmgikIyFzsuvtnbvVG:my.synapse.linux.server" ] } ] } }, "rooms": {}, "extensions": {} } ```
2024-06-06Handle OTK uploads off master (#17271)Erik Johnston3-38/+60
And fallback keys uploads. Only device keys need handling on master
2024-06-06Don't try and resync devices for down hosts (#17273)Erik Johnston2-6/+19
It's just a waste of time if we won't even query the remote host as its marked as down.
2024-06-06Always return OTK counts (#17275)Erik Johnston2-4/+30
Broke in https://github.com/element-hq/synapse/pull/17215
2024-06-05Ratelimiting of remote media downloads (#17256)Shay12-14/+372
2024-06-05Handle hyphens in user dir search porperly (#17254)Erik Johnston4-6/+104
c.f. #16675
2024-06-04Use fully-qualified `PersistedEventPosition` when returning `RoomsForUser` ↵Eric Eastwood11-75/+85
(#17265) Use fully-qualified `PersistedEventPosition` (`instance_name` and `stream_ordering`) when returning `RoomsForUser` to facilitate proper comparisons and `RoomStreamToken` generation. Spawning from https://github.com/element-hq/synapse/pull/17187 where we want to utilize this change
2024-06-04Bump sentry-sdk from 2.1.1 to 2.3.1 (#17263)dependabot[bot]1-4/+4
2024-06-04Fix typo in CHANGES.md v1.109.0rc1Andrew Morgan1-1/+1
2024-06-041.109.0rc1Andrew Morgan25-23/+61
2024-06-03Bump types-pyopenssl from 24.0.0.20240311 to 24.1.0.20240425 (#17260)dependabot[bot]1-3/+18
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03Bump mypy-zope from 1.0.3 to 1.0.4 (#17262)dependabot[bot]1-4/+4
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03Bump lxml from 5.2.1 to 5.2.2 (#17261)dependabot[bot]1-156/+144
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-31Fix bug where typing replication breaks (#17252)Erik Johnston3-4/+56
This can happen on restarts of the service, due to old rooms being pruned.
2024-05-31Fix logging errors when receiving invalid User ID for key querys (#17250)Erik Johnston2-0/+6
2024-05-31Fix sentry default tags (#17251)Erik Johnston2-10/+11
This was broken by the sentry 2.0 upgrade Broke in v1.108.0
2024-05-30In sync wait for worker to catch up since token (#17215)Erik Johnston7-7/+134
Otherwise things will get confused. An alternative would be to make sure that for lagging stream we don't return anything (and make sure the returned next_batch token doesn't go backwards). But that is a faff.
2024-05-30Fix deduplicating of membership events to not create unused state groups. ↵Erik Johnston4-35/+54
(#17164) We try and deduplicate in two places: 1) really early on, and 2) just before we persist the event. The first case was broken due to it occuring before the profile information was added, and so it thought the event contents were different. The second case did catch it and handle it correctly, however doing so creates a redundant state group leading to bloat. Fixes #3791
2024-05-30Replaces all usages of `StreamIdGenerator` with `MultiWriterIdGenerator` ↵Erik Johnston10-363/+227
(#17229) Replaces all usages of `StreamIdGenerator` with `MultiWriterIdGenerator`, which is safer.
2024-05-30Clean out invalid destinations from outbox (#17242)Erik Johnston3-0/+92
We started ensuring we only insert valid destinations: https://github.com/element-hq/synapse/pull/17240
2024-05-30Ensure we delete media if we reject due to spam check (#17246)Erik Johnston3-32/+33
Fixes up #17239 We need to keep the spam check within the `try/except` block. Also makes it so that we don't enter the top span twice. Also also ensures that we get the right thumbnail length.
2024-05-29Move towards using `MultiWriterIdGenerator` everywhere (#17226)Erik Johnston10-379/+341
There is a problem with `StreamIdGenerator` where it can go backwards over restarts when a stream ID is requested but then not inserted into the DB. This is problematic if we want to land #17215, and is generally a potential cause for all sorts of nastiness. Instead of trying to fix `StreamIdGenerator`, we may as well move to `MultiWriterIdGenerator` that does not suffer from this problem (the latest positions are stored in `stream_positions` table). This involves adding SQLite support to the class. This only changes id generators that were already using `MultiWriterIdGenerator` under postgres, a separate PR will move the rest of the uses of `StreamIdGenerator` over.
2024-05-29Don't invalidate all `get_relations_for_event` on history purge (#17083)Erik Johnston6-13/+41
This is a tree cache already, so may as well move the room ID to the front and use that
2024-05-29Change allow_unsafe_locale to also apply on new databases (#17238)Erik Johnston3-7/+13
We relax this as there are use cases where this is safe, though it is still highly recommended that people avoid using it.
2024-05-29Ignore attempts to send to-device messages to bad users (#17240)Erik Johnston2-0/+8
Currently sending a to-device message to a user ID with a dodgy destination is accepted, but then ends up spamming the logs when we try and send to the destination. An alternative would be to reject the request, but I'm slightly nervous that could break things.
2024-05-29Handle duplicate OTK uploads racing (#17241)Erik Johnston2-33/+46
Currently this causes one of then to 500.
2024-05-29Fix slipped logging context when media rejected (#17239)Erik Johnston6-91/+55
When a module rejects a piece of media we end up trying to close the same logging context twice. Instead of fixing the existing code we refactor to use an async context manager, which is easier to write correctly.
2024-05-28Bump phonenumbers from 8.13.35 to 8.13.37 (#17235)dependabot[bot]1-3/+3
2024-05-281.108.0 v1.108.0 github/release-v1.108 release-v1.108Olivier 'reivilibre3-1/+14
2024-05-28Bump pyicu from 2.13 to 2.13.1 (#17236)dependabot[bot]1-2/+2
2024-05-28Bump pyopenssl from 24.0.0 to 24.1.0 (#17234)dependabot[bot]1-4/+4
2024-05-28Bump prometheus-client from 0.19.0 to 0.20.0 (#17233)dependabot[bot]1-3/+3
2024-05-28Bump serde from 1.0.202 to 1.0.203 (#17232)dependabot[bot]1-4/+4
2024-05-24Support MSC3916 by adding unstable media endpoints to `_matrix/client` (#17213)Shay7-549/+2393
[MSC3916](https://github.com/matrix-org/matrix-spec-proposals/blob/rav/authentication-for-media/proposals/3916-authentication-for-media.md) adds new media endpoints under `_matrix/client`. This PR adds the `/preview_url`, `/config`, and `/thumbnail` endpoints. `/download` will be added in a follow-up PR once the work for the federation `/download` endpoint is complete (see https://github.com/element-hq/synapse/pull/17172). Should be reviewable commit-by-commit.
2024-05-23Add Sliding Sync `/sync/e2ee` endpoint for To-Device messages (#17167)Eric Eastwood7-175/+861
This is being introduced as part of Sliding Sync but doesn't have any sliding window component. It's just a way to get E2EE events without having to sit through a big initial sync (`/sync` v2). And we can avoid encryption events being backed up by the main sync response or vice-versa. Part of some Sliding Sync simplification/experimentation. See [this discussion](https://github.com/element-hq/synapse/pull/17167#discussion_r1610495866) for why it may not be as useful as we thought. Based on: - https://github.com/matrix-org/matrix-spec-proposals/pull/3575 - https://github.com/matrix-org/matrix-spec-proposals/pull/3885 - https://github.com/matrix-org/matrix-spec-proposals/pull/3884
2024-05-22Log exceptions when failing to auto-join new user according to the ↵reivilibre2-1/+2
`auto_join_rooms` option. (#17176) Would have been useful for tracking down #16878. Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2024-05-22Add logging to tasks managed by the task scheduler, showing CPU and database ↵reivilibre2-2/+68
usage. (#17219) The log format is the same as the request log format, except: - fields that are specific to HTTP requests have been removed - the task's params are included at the end of the log line. These log lines are emitted: - when the task function finishes — both completion and failure (and I suppose it is possible for a task to become schedulable again?) - every 5 minutes whilst it is running Closes #17217. --------- Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2024-05-22Reduce work of calculating outbound device pokes (#17211)Erik Johnston3-0/+32
2024-05-22Update Lemonldap-NG OIDC config (#17204)Yadd2-0/+3
Update OIDC documentation: by default Matrix doesn't query userinfo endpoint, then claims should be put on id_token.
2024-05-21Bring auto-accept invite logic into Synapse (#17147)devonh11-1/+945
This PR ports the logic from the [synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite) module into synapse. I went with the naive approach of injecting the "module" next to where third party modules are currently loaded. If there is a better/preferred way to handle this, I'm all ears. It wasn't obvious to me if there was a better location to add this logic that would cleanly apply to all incoming invite events. Relies on https://github.com/element-hq/synapse/pull/17166 to fix linter errors.
2024-05-21Improve perf of sync device lists (#17216)Erik Johnston5-62/+103
Re-introduces #17191, and includes #17197 and #17214 The basic idea is to stop calling `get_rooms_for_user` everywhere, and instead use the table `device_lists_changes_in_room`. Commits reviewable one-by-one.
2024-05-21Fixup changelog v1.108.0rc1Erik Johnston1-1/+1
2024-05-21Bump twine from 5.0.0 to 5.1.0 (#17225)dependabot[bot]1-3/+3
2024-05-21Bump bcrypt from 4.1.2 to 4.1.3 (#17224)dependabot[bot]1-28/+28
2024-05-21Bump pyasn1 from 0.5.1 to 0.6.0 (#17223)dependabot[bot]1-4/+4
2024-05-21Bump types-psycopg2 from 2.9.21.20240311 to 2.9.21.20240417 (#17222)dependabot[bot]1-3/+3
2024-05-21Bump serde from 1.0.201 to 1.0.202 (#17221)dependabot[bot]1-4/+4
2024-05-21Bump anyhow from 1.0.83 to 1.0.86 (#17220)dependabot[bot]1-2/+2
2024-05-21Fixup changelogErik Johnston1-1/+1
2024-05-211.108.0rc1Erik Johnston27-25/+53
2024-05-18Add a short sleep if the request is rate-limited (#17210)Erik Johnston6-4/+15
This helps prevent clients from "tight-looping" retrying their request.
2024-05-17Federated Knocking Endpoints added (missing in Docu) (#17058)Dominic Schubert2-0/+3
2024-05-16Refactor `SyncResultBuilder` assembly to its own function (#17202)Eric Eastwood2-116/+149
We will re-use `get_sync_result_builder(...)` in https://github.com/element-hq/synapse/pull/17167 Split out from https://github.com/element-hq/synapse/pull/17167
2024-05-16Fix `joined_rooms`/`joined_room_ids` usage (#17208)Eric Eastwood2-1/+2
This change was introduced in https://github.com/element-hq/synapse/pull/17203 But then https://github.com/element-hq/synapse/pull/17207 was reverted which brought back usage `joined_rooms` that needed to be updated. Wasn't caught because `develop` wasn't up to date before merging.
2024-05-16Rename to be obvious: `joined_rooms` -> `joined_room_ids` (#17203)Eric Eastwood2-2/+3
Split out from https://github.com/element-hq/synapse/pull/17167
2024-05-16Removed `request_key` from the `SyncConfig` (moved outside as its own ↵Eric Eastwood5-14/+59
function parameter) (#17201) Removed `request_key` from the `SyncConfig` (moved outside as its own function parameter) so it doesn't have to flow into `_generate_sync_entry_for_xxx` methods. This way we can separate the concerns of caching from generating the response and reuse the `_generate_sync_entry_for_xxx` functions as we see fit. Plus caching doesn't really have anything to do with the config of sync. Split from https://github.com/element-hq/synapse/pull/17167 Spawning from https://github.com/element-hq/synapse/pull/17167#discussion_r1601497279
2024-05-16Route `/make_knock` and `/send_knock` to workers in Complement docker image ↵Andrew Morgan2-0/+3
(#17195)
2024-05-16Revert "Improve perf of sync device lists" (#17207)Erik Johnston3-9/+46
Reverts element-hq/synapse#17191
2024-05-16Fix bug where push rules would be empty in `/sync` (#17142)Erik Johnston3-13/+37
Fixes #16987 Some old accounts seem to have an entry in global account data table for push rules, which we should ignore
2024-05-16Refactor Sync handler to be able to return different sync responses ↵Eric Eastwood5-25/+128
(`SyncVersion`) (#17200) Refactor Sync handler to be able to be able to return different sync responses (`SyncVersion`). Preparation to be able support sync v2 and a new Sliding Sync `/sync/e2ee` endpoint which returns a subset of sync v2. Split upon request: https://github.com/element-hq/synapse/pull/17167#discussion_r1601497279 Split from https://github.com/element-hq/synapse/pull/17167 where we will add `SyncVersion.E2EE_SYNC` and a new type of sync response.
2024-05-15Fix request path for `federation_whitelist_endpoint_enabled` option in ↵Andrew Morgan2-1/+2
documentation (#17199)
2024-05-14Cache literal sync filter validation (#17186)Erik Johnston2-1/+14
The sliding sync proxy (amongst other things) use literal json blobs as filters, and repeatedly validating them takes a bunch of CPU.
2024-05-14Reduce pauses on large device list changes (#17192)Erik Johnston2-3/+11
For large accounts waking up all the relevant notifier streams can cause pauses of the reactor.
2024-05-14Improve perf of sync device lists (#17191)Erik Johnston3-46/+9
It's almost always more efficient to query the rooms that have device list changes, rather than looking at the list of all users whose devices have changed and then look for shared rooms.
2024-05-141.107.0 v1.107.0 github/release-v1.107 release-v1.107Andrew Morgan3-1/+13
2024-05-14Allows CAS SSO flow to provide user IDs composed of numbers only (#17098)Aurélien Grimpard4-0/+30
2024-05-14Bump serde_json from 1.0.116 to 1.0.117 (#17182)dependabot[bot]1-2/+2
2024-05-14Bump serde from 1.0.200 to 1.0.201 (#17183)dependabot[bot]1-4/+4
2024-05-14Bump gitpython from 3.1.41 to 3.1.43 (#17181)dependabot[bot]1-4/+5
2024-05-14Bump cryptography from 42.0.5 to 42.0.7 (#17180)dependabot[bot]1-33/+33
2024-05-14Bump immutabledict from 4.1.0 to 4.2.0 (#17179)dependabot[bot]1-3/+3
2024-05-14Bump sentry-sdk from 1.40.3 to 2.1.1 (#17178)dependabot[bot]1-5/+21
2024-05-13An federation whitelist query endpoint extension (#16848)Erik Johnston8-0/+243
This is to allow clients to query the configured federation whitelist. Disabled by default. --------- Co-authored-by: Devon Hudson <devonhudson@librem.one> Co-authored-by: devonh <devon.dmytro@gmail.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-05-13Actually fix public rooms (#17184)Erik Johnston2-54/+55
See #17177. I'm an idiot and moved them to the wrong store :facepalm:
2024-05-13Fix bug with creating public rooms on workers (#17177)Erik Johnston2-65/+52
If room publication is disabled then creating public rooms on workers would not work. Introduced in #16811.
2024-05-09Update docs to bump libjemalloc version on latest debian; correct ↵ll-SKY-ll3-3/+4
"push_rules" stream name (#17171)
2024-05-08Bump black from 24.2.0 to 24.4.2 (#17170)Andrew Morgan2-34/+24
2024-05-08Fix undiscovered linter errors (#17166)devonh2-3/+12
Linter errors are showing up in #17147 that are unrelated to that PR. The errors do not currently show up on develop. This PR aims to resolve the linter errors separately from #17147.
2024-05-08Optional whitespace support in Authorization (#1350) (#17145)Timshel3-1/+13
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-05-08Update PyO3 to 0.21 (#17162)Erik Johnston10-152/+202
This version change requires a migration to a new API. See https://pyo3.rs/v0.21.2/migration#from-020-to-021 This will fix the annoying warnings added when using the recent rust nightly: > warning: non-local `impl` definition, they should be avoided as they go against expectation
2024-05-08Note preset behaviour in `autocreate_auto_join_room_preset` docs (#17150)Andrew Morgan2-0/+6
2024-05-08Add note about MSC3886 being closed (#17151)Hugh Nimmo-Smith2-0/+4
2024-05-07Add note about external_ids for User Admin API in documentation (#17139)Jacob Sánchez2-2/+3
2024-05-07Tweak changelog v1.107.0rc1Olivier 'reivilibre1-6/+6
2024-05-071.107.0rc1Olivier 'reivilibre26-24/+66
2024-05-07Bump serde from 1.0.199 to 1.0.200 (#17161)dependabot[bot]1-4/+4
2024-05-07Bump pydantic from 2.7.0 to 2.7.1 (#17160)dependabot[bot]1-84/+84
2024-05-07Bump types-pillow from 10.2.0.20240415 to 10.2.0.20240423 (#17159)dependabot[bot]1-3/+3
2024-05-07Bump lxml from 5.1.0 to 5.2.1 (#17158)dependabot[bot]1-80/+157
2024-05-07Bump jsonschema from 4.21.1 to 4.22.0 (#17157)dependabot[bot]1-4/+15
Bumps [jsonschema](https://github.com/python-jsonschema/jsonschema) from 4.21.1 to 4.22.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/python-jsonschema/jsonschema/releases">jsonschema's releases</a>.</em></p> <blockquote> <h2>v4.22.0</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Improve <code>best_match</code> (and thereby error messages from <code>jsonschema.validate</code>) in cases where there are multiple <em>sibling</em> errors from applying <code>anyOf</code> / <code>allOf</code> -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (<a href="https://redirect.github.com/python-jsonschema/jsonschema/issues/1250">#1250</a>).</li> <li>(Micro-)optimize equality checks when comparing for JSON Schema equality by first checking for object identity, as <code>==</code> would.</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/shinnar"><code>@​shinnar</code></a> made their first contribution in <a href="https://redirect.github.com/python-jsonschema/jsonschema/pull/1224">python-jsonschema/jsonschema#1224</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/python-jsonschema/jsonschema/compare/v4.21.1...v4.22.0">https://github.com/python-jsonschema/jsonschema/compare/v4.21.1...v4.22.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python-jsonschema/jsonschema/blob/main/CHANGELOG.rst">jsonschema's changelog</a>.</em></p> <blockquote> <h1>v4.22.0</h1> <ul> <li>Improve <code>best_match</code> (and thereby error messages from <code>jsonschema.validate</code>) in cases where there are multiple <em>sibling</em> errors from applying <code>anyOf</code> / <code>allOf</code> -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (<a href="https://redirect.github.com/python-jsonschema/jsonschema/issues/1250">#1250</a>).</li> <li>(Micro-)optimize equality checks when comparing for JSON Schema equality by first checking for object identity, as <code>==</code> would.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/9882dbeb1a0a0cb1c7e521837132a91cfcc9e0f0"><code>9882dbe</code></a> Add / ignore the new specification test suite property.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/ebc90bb2df9bbe99dd043405a5924aa56205201a"><code>ebc90bb</code></a> Merge commit '8fcfc3a674a7188a4fcc822b7a91efb3e0422a20'</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/8fcfc3a674a7188a4fcc822b7a91efb3e0422a20"><code>8fcfc3a</code></a> Squashed 'json/' changes from b41167c74..54f3784a8</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/30b7537944fa49950cba3586a866709b662d5073"><code>30b7537</code></a> Pin pyenchant to pre from below until <a href="https://redirect.github.com/pyenchant/pyenchant/issues/302">pyenchant/pyenchant#302</a> is released.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/c3729db7328180ee33acd1cdb5d23c24470a08dd"><code>c3729db</code></a> Enable doctests for the rest of the referencing page.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/70a994ceaba5794eb85483d389d6d3460e607c2f"><code>70a994c</code></a> Remove a now-unneeded noqa since apparently this is fixed in new ruff.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/e6d0ef1cffc375b040d018cd6b1035400de86760"><code>e6d0ef1</code></a> Fix a minor typo in the referencing example docs.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/bceaf41a7dbece0a642c7a6d7859114870875951"><code>bceaf41</code></a> Another placeholder benchmark for future optimization.</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/b20234e86c4dadf5d691400383a6fc0a1e9afc34"><code>b20234e</code></a> Consider errors from earlier indices (in instances) to be better matches</li> <li><a href="https://github.com/python-jsonschema/jsonschema/commit/41b49c68e5377f44e54fb1596b233a8da21c24f1"><code>41b49c6</code></a> Minor improvement to test failure message when a best match test fails.</li> <li>Additional commits viewable in <a href="https://github.com/python-jsonschema/jsonschema/compare/v4.21.1...v4.22.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jsonschema&package-manager=pip&previous-version=4.21.1&new-version=4.22.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06Add optimisation to `StreamChangeCache` (#17130)Erik Johnston3-4/+34
When there have been lots of changes compared with the number of entities, we can do a fast(er) path. Locally I ran some benchmarking, and the comparison seems to give the best determination of which method we use.
2024-05-03Fix bug where `StreamChangeCache` would not respect cache factors (#17152)Erik Johnston2-1/+2
Annoyingly mypy didn't pick up this typo.
2024-05-03Fix lint.sh script (#17148)Erik Johnston2-1/+1
Broke in #17073
2024-05-03Bump `pillow` from 10.2.0 to 10.3.0 (#17146)Andrew Morgan2-437/+74
2024-05-02upgrade.md: Bump minimum Rust version to 1.66.0 (element-hq#17079) (#17140)jahway6032-0/+9
upgrade.md: Bump minimum Rust version to 1.66.0 (element-hq#17079)
2024-05-02synapse complement image: hardcode enabling msc3266 (#17105)Benjamin Bouvier2-0/+3
This is an alternative to https://github.com/matrix-org/matrix-rust-sdk/issues/3340 where we don't need to change our CI setup too much in the Rust SDK repository, and still can test MSC3266.
2024-05-01Add support for MSC3823 - Account Suspension (#17051)Shay9-7/+173
2024-05-01Drop sphinx docs (#17073)Erik Johnston7-138/+1
It is broken, and we only seemed to have been building it for the federation sender. Closes https://github.com/element-hq/synapse/issues/16804
2024-05-01Correct licensing metadata on the Docker image (#17141)Ben Banfield-Zanin2-1/+2
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-04-30Enable complement tests for MSC4115 support (#17137)Richard van der Hoff2-3/+14
Follow-up to #17137 and https://github.com/matrix-org/complement/pull/722
2024-04-301.106.0 v1.106.0 github/release-v1.106 release-v1.106Andrew Morgan3-1/+14
2024-04-29Apply user `email` & `picture` during OIDC registration if present & ↵devonh5-15/+205
selected (#17120) This change will apply the `email` & `picture` provided by OIDC to the new user account when registering a new user via OIDC. If the user is directed to the account details form, this change makes sure they have been selected before applying them, otherwise they are omitted. In particular, this change ensures the values are carried through when Synapse has consent configured, and the redirect to the consent form/s are followed. I have tested everything manually. Including: - with/without consent configured - allowing/not allowing the use of email/avatar (via `sso_auth_account_details.html`) - with/without automatic account detail population (by un/commenting the `localpart_template` option in synapse config). ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-04-29Add support for MSC4115 (#17104)Richard van der Hoff20-125/+407
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-04-29Update tornado 6.2 -> 6.4 (#17131)Andrew Morgan2-25/+15
2024-04-29Ensure that incoming to-device messages are not dropped (#17127)Richard van der Hoff5-19/+55
... when workers are unreachable, etc. Fixes https://github.com/element-hq/synapse/issues/17117. The general principle is just to make sure that we propagate any exceptions to the JsonResource, so that we return an error code to the sending server. That means that the sending server no longer considers the message safely sent, so it will retry later. In the issue, Erik mentions that an alternative solution would be to persist the to-device messages into a table so that they can be retried. This might be an improvement for performance, but even if we did that, we still need this mechanism, since we might be unable to reach the database. So, if we want to do that, it can be a later follow-up. --------- Co-authored-by: Erik Johnston <erik@matrix.org>
2024-04-29Declare support for Matrix v1.10. (#17082)Patrick Cloke2-0/+2
Pretty straightforward. 😄 Fixes #17021
2024-04-29Bump types-setuptools from 69.0.0.20240125 to 69.5.0.20240423 (#17134)dependabot[bot]1-3/+3
Bumps [types-setuptools](https://github.com/python/typeshed) from 69.0.0.20240125 to 69.5.0.20240423. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/python/typeshed/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=types-setuptools&package-manager=pip&previous-version=69.0.0.20240125&new-version=69.5.0.20240423)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29Bump idna from 3.6 to 3.7 (#17136)dependabot[bot]1-3/+3
Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/kjd/idna/releases">idna's releases</a>.</em></p> <blockquote> <h2>v3.7</h2> <h2>What's Changed</h2> <ul> <li>Fix issue where specially crafted inputs to encode() could take exceptionally long amount of time to process. [CVE-2024-3651]</li> </ul> <p>Thanks to Guido Vranken for reporting the issue.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/kjd/idna/compare/v3.6...v3.7">https://github.com/kjd/idna/compare/v3.6...v3.7</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/kjd/idna/blob/master/HISTORY.rst">idna's changelog</a>.</em></p> <blockquote> <p>3.7 (2024-04-11) ++++++++++++++++</p> <ul> <li>Fix issue where specially crafted inputs to encode() could take exceptionally long amount of time to process. [CVE-2024-3651]</li> </ul> <p>Thanks to Guido Vranken for reporting the issue.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/kjd/idna/commit/1d365e17e10d72d0b7876316fc7b9ca0eebdd38d"><code>1d365e1</code></a> Release v3.7</li> <li><a href="https://github.com/kjd/idna/commit/c1b3154939907fab67c5754346afaebe165ce8e6"><code>c1b3154</code></a> Merge pull request <a href="https://redirect.github.com/kjd/idna/issues/172">#172</a> from kjd/optimize-contextj</li> <li><a href="https://github.com/kjd/idna/commit/0394ec76ff022813e770ba1fd89658790ea35623"><code>0394ec7</code></a> Merge branch 'master' into optimize-contextj</li> <li><a href="https://github.com/kjd/idna/commit/cd58a23173d2b0a40b95ee680baf3e59e8d33966"><code>cd58a23</code></a> Merge pull request <a href="https://redirect.github.com/kjd/idna/issues/152">#152</a> from elliotwutingfeng/dev</li> <li><a href="https://github.com/kjd/idna/commit/5beb28b9dd77912c0dd656d8b0fdba3eb80222e7"><code>5beb28b</code></a> More efficient resolution of joiner contexts</li> <li><a href="https://github.com/kjd/idna/commit/1b121483ed04d9576a1291758f537e1318cddc8b"><code>1b12148</code></a> Update ossf/scorecard-action to v2.3.1</li> <li><a href="https://github.com/kjd/idna/commit/d516b874c3388047934938a500c7488d52c4e067"><code>d516b87</code></a> Update Github actions/checkout to v4</li> <li><a href="https://github.com/kjd/idna/commit/c095c75943413c75ebf8ac74179757031b7f80b7"><code>c095c75</code></a> Merge branch 'master' into dev</li> <li><a href="https://github.com/kjd/idna/commit/60a0a4cb61ec6834d74306bd8a1fa46daac94c98"><code>60a0a4c</code></a> Fix typo in GitHub Actions workflow key</li> <li><a href="https://github.com/kjd/idna/commit/5918a0ef8034379c2e409ae93ee11d24295bb201"><code>5918a0e</code></a> Merge branch 'master' into dev</li> <li>Additional commits viewable in <a href="https://github.com/kjd/idna/compare/v3.6...v3.7">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=idna&package-manager=pip&previous-version=3.6&new-version=3.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29Bump twisted from 23.10.0 to 24.3.0 (#17135)dependabot[bot]1-4/+4
Bumps [twisted](https://github.com/twisted/twisted) from 23.10.0 to 24.3.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/twisted/twisted/releases">twisted's releases</a>.</em></p> <blockquote> <h1>Twisted 24.3.0 (2024-03-01)</h1> <p>This release supports PyPy v7.3.14.</p> <h2>Bugfixes</h2> <ul> <li>twisted.logger.formatEvent now honors dotted method names, not just flat function names, in format strings, as it has long been explicitly documented to do. So, you will now get the expected result from [formatEvent(&quot;here's the result of calling a method at log-format time: {obj.method()}&quot;, obj=...)]{.title-ref} (<a href="https://redirect.github.com/twisted/twisted/issues/9347">#9347</a>)</li> <li>twisted.web.http.HTTPChannel now ignores the trailer headers provided in the last chunk of a chunked encoded response, rather than raising an exception. (<a href="https://redirect.github.com/twisted/twisted/issues/11997">#11997</a>)</li> <li>twisted.protocols.tls.BufferingTLSTransport, used by default by twisted.protocols.tls.TLSMemoryBIOFactory, was refactored for improved performance when doing a high number of small writes. (<a href="https://redirect.github.com/twisted/twisted/issues/12011">#12011</a>)</li> <li>twisted.python.failure.Failure now throws exception for generators without triggering a deprecation warnings on Python 3.12. (<a href="https://redirect.github.com/twisted/twisted/issues/12026">#12026</a>)</li> <li>twisted.internet.process.Process, used by <code>reactor.spawnProcess</code>, now copies the parent environment when the [env=None]{.title-ref} argument is passed on Posix systems and <code>os.posix_spawnp</code> is used internally. (<a href="https://redirect.github.com/twisted/twisted/issues/12068">#12068</a>)</li> <li>twisted.internet.defer.inlineCallbacks.returnValue's stack introspection was adjusted for the latest PyPy 7.3.14 release, allowing legacy <a href="https://github.com/inlineCallbacks"><code>@​inlineCallbacks</code></a> to run on new PyPY versions. (<a href="https://redirect.github.com/twisted/twisted/issues/12084">#12084</a>)</li> </ul> <h2>Deprecations and Removals</h2> <ul> <li>twisted.trial.reporter.TestRun.startTest() is no longer called for tests with skip annotation or skip attribute for Python 3.12.1 or newer. This is the result of upstream Python <a href="https://redirect.github.com/twisted/twisted/issues/106584">gh-106584</a> change. The behavior is not change in 3.12.0 or older. (<a href="https://redirect.github.com/twisted/twisted/issues/12052">#12052</a>)</li> </ul> <h2>Misc</h2> <ul> <li><a href="https://redirect.github.com/twisted/twisted/issues/11902">#11902</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12018">#12018</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12023">#12023</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12031">#12031</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12032">#12032</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12052">#12052</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12056">#12056</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12067">#12067</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12076">#12076</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12078">#12078</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12087">#12087</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12095">#12095</a></li> </ul> <h2>Conch</h2> <p>No significant changes.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/twisted/twisted/blob/trunk/NEWS.rst">twisted's changelog</a>.</em></p> <blockquote> <h1>Twisted 24.3.0 (2024-03-01)</h1> <p>This release supports PyPy v7.3.14.</p> <h2>Bugfixes</h2> <ul> <li>twisted.logger.formatEvent now honors dotted method names, not just flat function names, in format strings, as it has long been explicitly documented to do. So, you will now get the expected result from <code>formatEvent(&quot;here's the result of calling a method at log-format time: {obj.method()}&quot;, obj=...)</code> (<a href="https://redirect.github.com/twisted/twisted/issues/9347">#9347</a>)</li> <li>twisted.web.http.HTTPChannel now ignores the trailer headers provided in the last chunk of a chunked encoded response, rather than raising an exception. (<a href="https://redirect.github.com/twisted/twisted/issues/11997">#11997</a>)</li> <li>twisted.protocols.tls.BufferingTLSTransport, used by default by twisted.protocols.tls.TLSMemoryBIOFactory, was refactored for improved performance when doing a high number of small writes. (<a href="https://redirect.github.com/twisted/twisted/issues/12011">#12011</a>)</li> <li>twisted.python.failure.Failure now throws exception for generators without triggering a deprecation warnings on Python 3.12. (<a href="https://redirect.github.com/twisted/twisted/issues/12026">#12026</a>)</li> <li>twisted.internet.process.Process, used by <code>reactor.spawnProcess</code>, now copies the parent environment when the <code>env=None</code> argument is passed on Posix systems and <code>os.posix_spawnp</code> is used internally. (<a href="https://redirect.github.com/twisted/twisted/issues/12068">#12068</a>)</li> <li>twisted.internet.defer.inlineCallbacks.returnValue's stack introspection was adjusted for the latest PyPy 7.3.14 release, allowing legacy <a href="https://github.com/inlineCallbacks"><code>@​inlineCallbacks</code></a> to run on new PyPY versions. (<a href="https://redirect.github.com/twisted/twisted/issues/12084">#12084</a>)</li> </ul> <h2>Deprecations and Removals</h2> <ul> <li>twisted.trial.reporter.TestRun.startTest() is no longer called for tests with skip annotation or skip attribute for Python 3.12.1 or newer. This is the result of upstream Python <a href="https://redirect.github.com/twisted/twisted/issues/106584">gh-106584</a> change. The behavior is not change in 3.12.0 or older. (<a href="https://redirect.github.com/twisted/twisted/issues/12052">#12052</a>)</li> </ul> <h2>Misc</h2> <ul> <li><a href="https://redirect.github.com/twisted/twisted/issues/11902">#11902</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12018">#12018</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12023">#12023</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12031">#12031</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12032">#12032</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12052">#12052</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12056">#12056</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12067">#12067</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12076">#12076</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12078">#12078</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12087">#12087</a>, <a href="https://redirect.github.com/twisted/twisted/issues/12095">#12095</a></li> </ul> <h2>Conch</h2> <p>No significant changes.</p> <h2>Web</h2> <p>Bugfixes</p> <pre><code> - The documentation for twisted.web.client.CookieAgent no longer references long-deprecated ``cookielib`` and ``urllib2`` standard library modules. ([#12044](https://github.com/twisted/twisted/issues/12044)) <p>&lt;/tr&gt;&lt;/table&gt; </code></pre></p> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/twisted/twisted/commit/2e59e1fb322bc4b20009443f2252ecc6d7c79f80"><code>2e59e1f</code></a> Merge remote-tracking branch 'origin/release-24.2.0-12097' into release-24.2....</li> <li><a href="https://github.com/twisted/twisted/commit/64a18eb6d8a71de2dafe6212482a680a12397e0b"><code>64a18eb</code></a> Prep for final release.</li> <li><a href="https://github.com/twisted/twisted/commit/c33d114c83cc283376650defda0e253053c87ef3"><code>c33d114</code></a> Update NEWS.rst</li> <li><a href="https://github.com/twisted/twisted/commit/d7c9b3d886d0f99fe86df2f8bfc9080063ab4b08"><code>d7c9b3d</code></a> Clarify and fix docs.</li> <li><a href="https://github.com/twisted/twisted/commit/4ed1a5b8ad9aaa1e3c5adb13076a2d79ec4279f1"><code>4ed1a5b</code></a> Update copyright year.</li> <li><a href="https://github.com/twisted/twisted/commit/a2ba6eb33011e75102f35a630cd594e0bab403c4"><code>a2ba6eb</code></a> Changelog for 24.2.0.</li> <li><a href="https://github.com/twisted/twisted/commit/f2f1bc5d544efef89139a6a264d39ce0598e3b68"><code>f2f1bc5</code></a> New pre-release.</li> <li><a href="https://github.com/twisted/twisted/commit/446ee139189440e890b26a29af256e9b9d0e8eba"><code>446ee13</code></a> Fix chat.py example (<a href="https://redirect.github.com/twisted/twisted/issues/12070">#12070</a>)</li> <li><a href="https://github.com/twisted/twisted/commit/d05599b21ad3ab3185ca73aa465be0d8dd79a98b"><code>d05599b</code></a> Merge branch 'trunk' into fix-chat-example</li> <li><a href="https://github.com/twisted/twisted/commit/234f3788b60f21ccdc51e7b865d244b9343877bf"><code>234f378</code></a> <a href="https://redirect.github.com/twisted/twisted/issues/11902">#11902</a> - Fix type for twisted.web.server.Request.defaultContentType (<a href="https://redirect.github.com/twisted/twisted/issues/12101">#12101</a>)</li> <li>Additional commits viewable in <a href="https://github.com/twisted/twisted/compare/twisted-23.10.0...twisted-24.3.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=twisted&package-manager=pip&previous-version=23.10.0&new-version=24.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29Bump serde from 1.0.198 to 1.0.199 (#17132)dependabot[bot]1-4/+4
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.198 to 1.0.199. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/serde-rs/serde/releases">serde's releases</a>.</em></p> <blockquote> <h2>v1.0.199</h2> <ul> <li>Fix ambiguous associated item when <code>forward_to_deserialize_any!</code> is used on an enum with <code>Error</code> variant (<a href="https://redirect.github.com/serde-rs/serde/issues/2732">#2732</a>, thanks <a href="https://github.com/aatifsyed"><code>@​aatifsyed</code></a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/serde-rs/serde/commit/147702871760a38d2e97e0cd15d568559876aeda"><code>1477028</code></a> Release 1.0.199</li> <li><a href="https://github.com/serde-rs/serde/commit/789740be0d2cc1d4e280639039f189cc5d98fb40"><code>789740b</code></a> Merge pull request <a href="https://redirect.github.com/serde-rs/serde/issues/2732">#2732</a> from aatifsyed/master</li> <li><a href="https://github.com/serde-rs/serde/commit/8fe7539bb2b46001f70751f1db60e1a7144f8f3d"><code>8fe7539</code></a> fix: ambiguous associated type in forward_to_deserialize_any!</li> <li><a href="https://github.com/serde-rs/serde/commit/f6623a36548cfce02f880a33c6d2f420934c95c5"><code>f6623a3</code></a> Ignore cast_precision_loss pedantic clippy lint</li> <li>See full diff in <a href="https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.198&new-version=1.0.199)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29Bump furo from 2024.1.29 to 2024.4.27 (#17133)dependabot[bot]1-3/+3
Bumps [furo](https://github.com/pradyunsg/furo) from 2024.1.29 to 2024.4.27. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pradyunsg/furo/blob/main/docs/changelog.md">furo's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <!-- raw HTML omitted --> <h2>2024.04.27 -- Bold Burgundy</h2> <ul> <li>Add a skip to content link.</li> <li>Add <code>--font-stack--headings</code>.</li> <li>Add <code>:visited</code> colour and enforce uniform contrast between light/dark.</li> <li>Add an offset of <code>:target</code> to reduce back-to-top overlap.</li> <li>Improve dark mode colours.</li> <li>Fix outstanding colour contrast warnings on Firefox.</li> <li>Fix bad indent in footnotes.</li> <li>Tweak handling of default configuration options in a more resilient manner.</li> <li>Tweak length and sizing of API <code>source</code> links.</li> <li>Stop search engine indexing on search page.</li> </ul> <h2>2024.01.29 -- Amazing Amethyst</h2> <ul> <li>Fix canonical url when building with <code>dirhtml</code>.</li> <li>Relicense the demo module.</li> </ul> <h2>2023.09.10 -- Zesty Zaffre</h2> <ul> <li>Make asset hash injection idempotent, fixing Sphinx 6 compatibility.</li> <li>Fix the check for HTML builders, fixing non-HTML Read the Docs builds.</li> </ul> <h2>2023.08.19 -- Xenolithic Xanadu</h2> <ul> <li>Fix missing search context with Sphinx 7.2, for dirhtml builds.</li> <li>Drop support for Python 3.7.</li> <li>Present configuration errors in a better format -- thanks <a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>!</li> <li>Bump <code>require_sphinx()</code> to Sphinx 6.0, in line with dependency changes in Unassuming Ultramarine.</li> </ul> <h2>2023.08.17 -- Wonderous White</h2> <ul> <li>Fix compatiblity with Sphinx 7.2.0 and 7.2.1.</li> </ul> <h2>2023.07.26 -- Vigilant Volt</h2> <ul> <li>Fix compatiblity with Sphinx 7.1.</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pradyunsg/furo/commit/750fcd77fdbd4621919e461d366568847d378f6e"><code>750fcd7</code></a> Prepare release: 2024.04.27</li> <li><a href="https://github.com/pradyunsg/furo/commit/c0cb0200f0234a30845a6ee4435ab34cfbcb53be"><code>c0cb020</code></a> Update changelog</li> <li><a href="https://github.com/pradyunsg/furo/commit/3787a7c1f2a63393bb5e2d9f7af87955783b1cf8"><code>3787a7c</code></a> Patch <code>app.config</code> in a more resilient manner (<a href="https://redirect.github.com/pradyunsg/furo/issues/783">#783</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/6a3afaba3883216e8135a9d15d4da047b37c2b9c"><code>6a3afab</code></a> Indent all children of aside.footnote (<a href="https://redirect.github.com/pradyunsg/furo/issues/788">#788</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/035b27651632e20fec2277e7398cdd00dc63a73f"><code>035b276</code></a> fix: no index content on search page (<a href="https://redirect.github.com/pradyunsg/furo/issues/784">#784</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/151f5232715b22fa190a478e67611c3bacbd45df"><code>151f523</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/pradyunsg/furo/issues/771">#771</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/2eb75aa20ec2804f1f34cd5a5bc8dfd55587824d"><code>2eb75aa</code></a> Bump the github-actions group with 1 update (<a href="https://redirect.github.com/pradyunsg/furo/issues/777">#777</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/df6f65c819fb1afef26ef4efbfbb64d0bff6c44d"><code>df6f65c</code></a> Bump the npm group with 6 updates (<a href="https://redirect.github.com/pradyunsg/furo/issues/778">#778</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/0b51a5eebdf6e643208f1dda45e68d3aee09c1fa"><code>0b51a5e</code></a> Add space after period in ToC warning (<a href="https://redirect.github.com/pradyunsg/furo/issues/776">#776</a>)</li> <li><a href="https://github.com/pradyunsg/furo/commit/01887051504bbec32e241af9cebcf5cd10f656d1"><code>0188705</code></a> Bump the npm group with 5 updates (<a href="https://redirect.github.com/pradyunsg/furo/issues/770">#770</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pradyunsg/furo/compare/2024.01.29...2024.04.27">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=furo&package-manager=pip&previous-version=2024.1.29&new-version=2024.4.27)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-26Fix various typos in docs (#17114)devonh9-12/+13
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-04-26Fix filtering of rooms when supplying the `destination` query parameter to ↵Andrew Morgan3-3/+66
`/_synapse/admin/v1/federation/destinations/<destination>/rooms` (#17077)
2024-04-26Add RuntimeDirectory to matrix-synapse.service (#17084)villepeh2-0/+2
This makes it easy to store UNIX sockets with correct permissions. Those would be located in /run/synapse which is the directory used in many examples in Synapse configuration manual. Additionally, the directory and sockets are deleted when Synapse is shut down.
2024-04-26Improve error message for cross signing reset with MSC3861 enabled (#17121)Michael Telatynski2-5/+9
2024-04-26Rephrase enable_notifs configuration (#17116)Amanda H. L. de Andrade Katz2-2/+3
2024-04-26Use recommended endpoint for MSC3266 requests (#17078)Andrew Ferrazzutti3-1/+8
Keep the existing endpoint for backwards compatibility Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
2024-04-26Update event_cache_size and global_factor configurations documentation (#17071)Amanda H. L. de Andrade Katz2-0/+9
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-04-26Return the search terms as search highlights for SQLite instead of nothing ↵Melvyn Laïly3-14/+31
(#17000) Fixes https://github.com/element-hq/synapse/issues/16999 and https://github.com/element-hq/element-android/pull/8729 by returning the search terms as search highlights.