Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC3288: Add room type to /_matrix/identity/v2/store-invite API #3288

Merged

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Jul 20, 2021

@BillCarsonFr BillCarsonFr force-pushed the bca/make_email_invite_space_aware branch from 872c06f to 7f8f9e1 Compare July 20, 2021 16:20
@turt2live turt2live changed the title add room type in store invite MSC3288: Add room type in store invite Jul 20, 2021
@turt2live turt2live added identity service kind:maintenance MSC which clarifies/updates existing spec proposal A matrix spec change proposal proposal-in-review labels Jul 20, 2021
richvdh added a commit to matrix-org/synapse that referenced this pull request Aug 24, 2021
Synapse 1.41.0rc1 (2021-08-18)
==============================

Features
--------

- Add `get_userinfo_by_id` method to ModuleApi. ([\#9581](#9581))
- Initial local support for [MSC3266](#10394), Room Summary over the unstable `/rooms/{roomIdOrAlias}/summary` API. ([\#10394](#10394))
- Experimental support for [MSC3288](matrix-org/matrix-spec-proposals#3288), sending `room_type` to the identity server for 3pid invites over the `/store-invite` API. ([\#10435](#10435))
- Add support for sending federation requests through a proxy. Contributed by @Bubu and @dklimpel. ([\#10475](#10475))
- Add support for "marker" events which makes historical events discoverable for servers that already have all of the scrollback history (part of [MSC2716](matrix-org/matrix-spec-proposals#2716)). ([\#10498](#10498))
- Add a configuration setting for the time a `/sync` response is cached for. ([\#10513](#10513))
- The default logging handler for new installations is now `PeriodicallyFlushingMemoryHandler`, a buffered logging handler which periodically flushes itself. ([\#10518](#10518))
- Add support for new redaction rules for historical events specified in [MSC2716](matrix-org/matrix-spec-proposals#2716). ([\#10538](#10538))
- Add a setting to disable TLS when sending email. ([\#10546](#10546))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\#10549](#10549), [\#10560](#10560), [\#10569](#10569), [\#10574](#10574), [\#10575](#10575), [\#10579](#10579), [\#10583](#10583))
- Admin API to delete several media for a specific user. Contributed by @dklimpel. ([\#10558](#10558), [\#10628](#10628))
- Add support for routing `/createRoom` to workers. ([\#10564](#10564))
- Update the Synapse Grafana dashboard. ([\#10570](#10570))
- Add an admin API (`GET /_synapse/admin/username_available`) to check if a username is available (regardless of registration settings). ([\#10578](#10578))
- Allow editing a user's `external_ids` via the "Edit User" admin API. Contributed by @dklimpel. ([\#10598](#10598))
- The Synapse manhole no longer needs coroutines to be wrapped in `defer.ensureDeferred`. ([\#10602](#10602))
- Add option to allow modules to run periodic tasks on all instances, rather than just the one configured to run background tasks. ([\#10638](#10638))

Bugfixes
--------

- Add some clarification to the sample config file. Contributed by @Kentokamoto. ([\#10129](#10129))
- Fix a long-standing bug where protocols which are not implemented by any appservices were incorrectly returned via `GET /_matrix/client/r0/thirdparty/protocols`. ([\#10532](#10532))
- Fix exceptions in logs when failing to get remote room list. ([\#10541](#10541))
- Fix longstanding bug which caused the user "status" to be reset when the user went offline. Contributed by @dklimpel. ([\#10550](#10550))
- Allow public rooms to be previewed in the spaces summary APIs from [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\#10580](#10580))
- Fix a bug introduced in v1.37.1 where an error could occur in the asynchronous processing of PDUs when the queue was empty. ([\#10592](#10592))
- Fix errors on /sync when read receipt data is a string. Only affects homeservers with the experimental flag for [MSC2285](matrix-org/matrix-spec-proposals#2285) enabled. Contributed by @SimonBrandner. ([\#10606](#10606))
- Additional validation for the spaces summary API to avoid errors like `ValueError: Stop argument for islice() must be None or an integer`. The missing validation has existed since v1.31.0. ([\#10611](#10611))
- Revert behaviour introduced in v1.38.0 that strips `org.matrix.msc2732.device_unused_fallback_key_types` from `/sync` when its value is empty. This field should instead always be present according to [MSC2732](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2732-olm-fallback-keys.md). ([\#10623](#10623))

Improved Documentation
----------------------

- Add documentation for configuration a forward proxy. ([\#10443](#10443))
- Updated the reverse proxy documentation to highlight the homserver configuration that is needed to make Synapse aware that is is intentionally reverse proxied. ([\#10551](#10551))
- Update CONTRIBUTING.md to fix index links and the instructions for SyTest in docker. ([\#10599](#10599))

Deprecations and Removals
-------------------------

- No longer build `.deb` packages for Ubuntu 20.10 LTS Groovy Gorilla, which has now EOLed. ([\#10588](#10588))
- The `template_dir` configuration settings in the `sso`, `account_validity` and `email` sections of the configuration file are now deprecated in favour of the global `templates.custom_template_directory` setting. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information. ([\#10596](#10596))

Internal Changes
----------------

- Improve event caching mechanism to avoid having multiple copies of an event in memory at a time. ([\#10119](#10119))
- Reduce errors in PostgreSQL logs due to concurrent serialization errors. ([\#10504](#10504))
- Include room ID in ignored EDU log messages. Contributed by @ilmari. ([\#10507](#10507))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\#10527](#10527), [\#10530](#10530))
- Fix CI to not break when run against branches rather than pull requests. ([\#10529](#10529))
- Mark all events stemming from the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint as historical. ([\#10537](#10537))
- Clean up some of the federation event authentication code for clarity. ([\#10539](#10539), [\#10591](#10591))
- Convert `Transaction` and `Edu` objects to attrs. ([\#10542](#10542))
- Update `/batch_send` endpoint to only return `state_events` created by the `state_events_from_before` passed in. ([\#10552](#10552))
- Update contributing.md to warn against rebasing an open PR. ([\#10563](#10563))
- Remove the unused public rooms replication stream. ([\#10565](#10565))
- Clarify error message when failing to join a restricted room. ([\#10572](#10572))
- Remove references to BuildKite in favour of GitHub Actions. ([\#10573](#10573))
- Move `/batch_send` endpoint defined by [MSC2716](matrix-org/matrix-spec-proposals#2716) to the `/v2_alpha` directory. ([\#10576](#10576))
- Allow multiple custom directories in `read_templates`. ([\#10587](#10587))
- Re-organize the `synapse.federation.transport.server` module to create smaller files. ([\#10590](#10590))
- Flatten the `synapse.rest.client` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\#10600](#10600))
- Build Debian packages for Debian 12 (Bookworm). ([\#10612](#10612))
- Fix up a couple of links to the database schema documentation. ([\#10620](#10620))
- Fix a broken link to the upgrade notes. ([\#10631](#10631))
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
@turt2live
Copy link
Member

This seems pretty straightforward

@mscbot fcp merge

@mscbot
Copy link
Collaborator

mscbot commented Aug 25, 2021

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • Unresolved suggestions

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added disposition-merge proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. and removed proposal-in-review labels Aug 25, 2021
aaronraimist added a commit to aaronraimist/synapse that referenced this pull request Aug 31, 2021
Synapse 1.41.0 (2021-08-24)
===========================

This release adds support for Debian 12 (Bookworm), but **removes support for Ubuntu 20.10 (Groovy Gorilla)**, which reached End of Life last month.

Note that when using workers the `/_synapse/admin/v1/users/{userId}/media` must now be handled by media workers. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information.

Features
--------

- Enable room capabilities ([MSC3244](matrix-org/matrix-spec-proposals#3244)) by default and set room version 8 as the preferred room version when creating restricted rooms. ([\matrix-org#10571](matrix-org#10571))

Synapse 1.41.0rc1 (2021-08-18)
==============================

Features
--------

- Add `get_userinfo_by_id` method to ModuleApi. ([\matrix-org#9581](matrix-org#9581))
- Initial local support for [MSC3266](matrix-org#10394), Room Summary over the unstable `/rooms/{roomIdOrAlias}/summary` API. ([\matrix-org#10394](matrix-org#10394))
- Experimental support for [MSC3288](matrix-org/matrix-spec-proposals#3288), sending `room_type` to the identity server for 3pid invites over the `/store-invite` API. ([\matrix-org#10435](matrix-org#10435))
- Add support for sending federation requests through a proxy. Contributed by @Bubu and @dklimpel. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information. ([\matrix-org#10596](matrix-org#10596)). ([\matrix-org#10475](matrix-org#10475))
- Add support for "marker" events which makes historical events discoverable for servers that already have all of the scrollback history (part of [MSC2716](matrix-org/matrix-spec-proposals#2716)). ([\matrix-org#10498](matrix-org#10498))
- Add a configuration setting for the time a `/sync` response is cached for. ([\matrix-org#10513](matrix-org#10513))
- The default logging handler for new installations is now `PeriodicallyFlushingMemoryHandler`, a buffered logging handler which periodically flushes itself. ([\matrix-org#10518](matrix-org#10518))
- Add support for new redaction rules for historical events specified in [MSC2716](matrix-org/matrix-spec-proposals#2716). ([\matrix-org#10538](matrix-org#10538))
- Add a setting to disable TLS when sending email. ([\matrix-org#10546](matrix-org#10546))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10549](matrix-org#10549), [\matrix-org#10560](matrix-org#10560), [\matrix-org#10569](matrix-org#10569), [\matrix-org#10574](matrix-org#10574), [\matrix-org#10575](matrix-org#10575), [\matrix-org#10579](matrix-org#10579), [\matrix-org#10583](matrix-org#10583))
- Admin API to delete several media for a specific user. Contributed by @dklimpel. ([\matrix-org#10558](matrix-org#10558), [\matrix-org#10628](matrix-org#10628))
- Add support for routing `/createRoom` to workers. ([\matrix-org#10564](matrix-org#10564))
- Update the Synapse Grafana dashboard. ([\matrix-org#10570](matrix-org#10570))
- Add an admin API (`GET /_synapse/admin/username_available`) to check if a username is available (regardless of registration settings). ([\matrix-org#10578](matrix-org#10578))
- Allow editing a user's `external_ids` via the "Edit User" admin API. Contributed by @dklimpel. ([\matrix-org#10598](matrix-org#10598))
- The Synapse manhole no longer needs coroutines to be wrapped in `defer.ensureDeferred`. ([\matrix-org#10602](matrix-org#10602))
- Add option to allow modules to run periodic tasks on all instances, rather than just the one configured to run background tasks. ([\matrix-org#10638](matrix-org#10638))

Bugfixes
--------

- Add some clarification to the sample config file. Contributed by @Kentokamoto. ([\matrix-org#10129](matrix-org#10129))
- Fix a long-standing bug where protocols which are not implemented by any appservices were incorrectly returned via `GET /_matrix/client/r0/thirdparty/protocols`. ([\matrix-org#10532](matrix-org#10532))
- Fix exceptions in logs when failing to get remote room list. ([\matrix-org#10541](matrix-org#10541))
- Fix longstanding bug which caused the user's presence "status message" to be reset when the user went offline. Contributed by @dklimpel. ([\matrix-org#10550](matrix-org#10550))
- Allow public rooms to be previewed in the spaces summary APIs from [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10580](matrix-org#10580))
- Fix a bug introduced in v1.37.1 where an error could occur in the asynchronous processing of PDUs when the queue was empty. ([\matrix-org#10592](matrix-org#10592))
- Fix errors on /sync when read receipt data is a string. Only affects homeservers with the experimental flag for [MSC2285](matrix-org/matrix-spec-proposals#2285) enabled. Contributed by @SimonBrandner. ([\matrix-org#10606](matrix-org#10606))
- Additional validation for the spaces summary API to avoid errors like `ValueError: Stop argument for islice() must be None or an integer`. The missing validation has existed since v1.31.0. ([\matrix-org#10611](matrix-org#10611))
- Revert behaviour introduced in v1.38.0 that strips `org.matrix.msc2732.device_unused_fallback_key_types` from `/sync` when its value is empty. This field should instead always be present according to [MSC2732](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2732-olm-fallback-keys.md). ([\matrix-org#10623](matrix-org#10623))

Improved Documentation
----------------------

- Add documentation for configuring a forward proxy. ([\matrix-org#10443](matrix-org#10443))
- Updated the reverse proxy documentation to highlight the homserver configuration that is needed to make Synapse aware that is is intentionally reverse proxied. ([\matrix-org#10551](matrix-org#10551))
- Update CONTRIBUTING.md to fix index links and the instructions for SyTest in docker. ([\matrix-org#10599](matrix-org#10599))

Deprecations and Removals
-------------------------

- No longer build `.deb` packages for Ubuntu 20.10 Groovy Gorilla, which has now EOLed. ([\matrix-org#10588](matrix-org#10588))
- The `template_dir` configuration settings in the `sso`, `account_validity` and `email` sections of the configuration file are now deprecated in favour of the global `templates.custom_template_directory` setting. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information. ([\matrix-org#10596](matrix-org#10596))

Internal Changes
----------------

- Improve event caching mechanism to avoid having multiple copies of an event in memory at a time. ([\matrix-org#10119](matrix-org#10119))
- Reduce errors in PostgreSQL logs due to concurrent serialization errors. ([\matrix-org#10504](matrix-org#10504))
- Include room ID in ignored EDU log messages. Contributed by @ilmari. ([\matrix-org#10507](matrix-org#10507))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10527](matrix-org#10527), [\matrix-org#10530](matrix-org#10530))
- Fix CI to not break when run against branches rather than pull requests. ([\matrix-org#10529](matrix-org#10529))
- Mark all events stemming from the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint as historical. ([\matrix-org#10537](matrix-org#10537))
- Clean up some of the federation event authentication code for clarity. ([\matrix-org#10539](matrix-org#10539), [\matrix-org#10591](matrix-org#10591))
- Convert `Transaction` and `Edu` objects to attrs. ([\matrix-org#10542](matrix-org#10542))
- Update `/batch_send` endpoint to only return `state_events` created by the `state_events_from_before` passed in. ([\matrix-org#10552](matrix-org#10552))
- Update contributing.md to warn against rebasing an open PR. ([\matrix-org#10563](matrix-org#10563))
- Remove the unused public rooms replication stream. ([\matrix-org#10565](matrix-org#10565))
- Clarify error message when failing to join a restricted room. ([\matrix-org#10572](matrix-org#10572))
- Remove references to BuildKite in favour of GitHub Actions. ([\matrix-org#10573](matrix-org#10573))
- Move `/batch_send` endpoint defined by [MSC2716](matrix-org/matrix-spec-proposals#2716) to the `/v2_alpha` directory. ([\matrix-org#10576](matrix-org#10576))
- Allow multiple custom directories in `read_templates`. ([\matrix-org#10587](matrix-org#10587))
- Re-organize the `synapse.federation.transport.server` module to create smaller files. ([\matrix-org#10590](matrix-org#10590))
- Flatten the `synapse.rest.client` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\matrix-org#10600](matrix-org#10600))
- Build Debian packages for Debian 12 (Bookworm). ([\matrix-org#10612](matrix-org#10612))
- Fix up a couple of links to the database schema documentation. ([\matrix-org#10620](matrix-org#10620))
- Fix a broken link to the upgrade notes. ([\matrix-org#10631](matrix-org#10631))
@richvdh richvdh changed the title MSC3288: Add room type in store invite MSC3288: Add room type to /store-invite API Aug 31, 2021
@richvdh richvdh changed the title MSC3288: Add room type to /store-invite API MSC3288: Add room type to /_matrix/identity/v2/store-invite API Aug 31, 2021
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
proposals/3288-pass_room_type_in_3pid_invite.md Outdated Show resolved Hide resolved
@turt2live turt2live merged commit ee39dbb into matrix-org:old_master Oct 23, 2021
@turt2live turt2live added spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec and removed finished-final-comment-period labels Oct 23, 2021
turt2live added a commit that referenced this pull request Oct 23, 2021
)

* add room type in store invite

* update dev identifier purpose

* Added clarification if type not present, and on email generation

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update proposals/3288-pass_room_type_in_3pid_invite.md

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update 3288-pass_room_type_in_3pid_invite.md

fix typo

Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Fizzadar pushed a commit to Fizzadar/synapse that referenced this pull request Oct 26, 2021
Synapse 1.41.0 (2021-08-24)
===========================

This release adds support for Debian 12 (Bookworm), but **removes support for Ubuntu 20.10 (Groovy Gorilla)**, which reached End of Life last month.

Note that when using workers the `/_synapse/admin/v1/users/{userId}/media` must now be handled by media workers. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information.

Features
--------

- Enable room capabilities ([MSC3244](matrix-org/matrix-spec-proposals#3244)) by default and set room version 8 as the preferred room version when creating restricted rooms. ([\matrix-org#10571](matrix-org#10571))

Synapse 1.41.0rc1 (2021-08-18)
==============================

Features
--------

- Add `get_userinfo_by_id` method to ModuleApi. ([\matrix-org#9581](matrix-org#9581))
- Initial local support for [MSC3266](matrix-org#10394), Room Summary over the unstable `/rooms/{roomIdOrAlias}/summary` API. ([\matrix-org#10394](matrix-org#10394))
- Experimental support for [MSC3288](matrix-org/matrix-spec-proposals#3288), sending `room_type` to the identity server for 3pid invites over the `/store-invite` API. ([\matrix-org#10435](matrix-org#10435))
- Add support for sending federation requests through a proxy. Contributed by @Bubu and @dklimpel. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information. ([\matrix-org#10596](matrix-org#10596)). ([\matrix-org#10475](matrix-org#10475))
- Add support for "marker" events which makes historical events discoverable for servers that already have all of the scrollback history (part of [MSC2716](matrix-org/matrix-spec-proposals#2716)). ([\matrix-org#10498](matrix-org#10498))
- Add a configuration setting for the time a `/sync` response is cached for. ([\matrix-org#10513](matrix-org#10513))
- The default logging handler for new installations is now `PeriodicallyFlushingMemoryHandler`, a buffered logging handler which periodically flushes itself. ([\matrix-org#10518](matrix-org#10518))
- Add support for new redaction rules for historical events specified in [MSC2716](matrix-org/matrix-spec-proposals#2716). ([\matrix-org#10538](matrix-org#10538))
- Add a setting to disable TLS when sending email. ([\matrix-org#10546](matrix-org#10546))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10549](matrix-org#10549), [\matrix-org#10560](matrix-org#10560), [\matrix-org#10569](matrix-org#10569), [\matrix-org#10574](matrix-org#10574), [\matrix-org#10575](matrix-org#10575), [\matrix-org#10579](matrix-org#10579), [\matrix-org#10583](matrix-org#10583))
- Admin API to delete several media for a specific user. Contributed by @dklimpel. ([\matrix-org#10558](matrix-org#10558), [\matrix-org#10628](matrix-org#10628))
- Add support for routing `/createRoom` to workers. ([\matrix-org#10564](matrix-org#10564))
- Update the Synapse Grafana dashboard. ([\matrix-org#10570](matrix-org#10570))
- Add an admin API (`GET /_synapse/admin/username_available`) to check if a username is available (regardless of registration settings). ([\matrix-org#10578](matrix-org#10578))
- Allow editing a user's `external_ids` via the "Edit User" admin API. Contributed by @dklimpel. ([\matrix-org#10598](matrix-org#10598))
- The Synapse manhole no longer needs coroutines to be wrapped in `defer.ensureDeferred`. ([\matrix-org#10602](matrix-org#10602))
- Add option to allow modules to run periodic tasks on all instances, rather than just the one configured to run background tasks. ([\matrix-org#10638](matrix-org#10638))

Bugfixes
--------

- Add some clarification to the sample config file. Contributed by @Kentokamoto. ([\matrix-org#10129](matrix-org#10129))
- Fix a long-standing bug where protocols which are not implemented by any appservices were incorrectly returned via `GET /_matrix/client/r0/thirdparty/protocols`. ([\matrix-org#10532](matrix-org#10532))
- Fix exceptions in logs when failing to get remote room list. ([\matrix-org#10541](matrix-org#10541))
- Fix longstanding bug which caused the user's presence "status message" to be reset when the user went offline. Contributed by @dklimpel. ([\matrix-org#10550](matrix-org#10550))
- Allow public rooms to be previewed in the spaces summary APIs from [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10580](matrix-org#10580))
- Fix a bug introduced in v1.37.1 where an error could occur in the asynchronous processing of PDUs when the queue was empty. ([\matrix-org#10592](matrix-org#10592))
- Fix errors on /sync when read receipt data is a string. Only affects homeservers with the experimental flag for [MSC2285](matrix-org/matrix-spec-proposals#2285) enabled. Contributed by @SimonBrandner. ([\matrix-org#10606](matrix-org#10606))
- Additional validation for the spaces summary API to avoid errors like `ValueError: Stop argument for islice() must be None or an integer`. The missing validation has existed since v1.31.0. ([\matrix-org#10611](matrix-org#10611))
- Revert behaviour introduced in v1.38.0 that strips `org.matrix.msc2732.device_unused_fallback_key_types` from `/sync` when its value is empty. This field should instead always be present according to [MSC2732](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2732-olm-fallback-keys.md). ([\matrix-org#10623](matrix-org#10623))

Improved Documentation
----------------------

- Add documentation for configuring a forward proxy. ([\matrix-org#10443](matrix-org#10443))
- Updated the reverse proxy documentation to highlight the homserver configuration that is needed to make Synapse aware that is is intentionally reverse proxied. ([\matrix-org#10551](matrix-org#10551))
- Update CONTRIBUTING.md to fix index links and the instructions for SyTest in docker. ([\matrix-org#10599](matrix-org#10599))

Deprecations and Removals
-------------------------

- No longer build `.deb` packages for Ubuntu 20.10 Groovy Gorilla, which has now EOLed. ([\matrix-org#10588](matrix-org#10588))
- The `template_dir` configuration settings in the `sso`, `account_validity` and `email` sections of the configuration file are now deprecated in favour of the global `templates.custom_template_directory` setting. See the [upgrade notes](https://matrix-org.github.io/synapse/latest/upgrade.html) for more information. ([\matrix-org#10596](matrix-org#10596))

Internal Changes
----------------

- Improve event caching mechanism to avoid having multiple copies of an event in memory at a time. ([\matrix-org#10119](matrix-org#10119))
- Reduce errors in PostgreSQL logs due to concurrent serialization errors. ([\matrix-org#10504](matrix-org#10504))
- Include room ID in ignored EDU log messages. Contributed by @ilmari. ([\matrix-org#10507](matrix-org#10507))
- Add pagination to the spaces summary based on updates to [MSC2946](matrix-org/matrix-spec-proposals#2946). ([\matrix-org#10527](matrix-org#10527), [\matrix-org#10530](matrix-org#10530))
- Fix CI to not break when run against branches rather than pull requests. ([\matrix-org#10529](matrix-org#10529))
- Mark all events stemming from the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint as historical. ([\matrix-org#10537](matrix-org#10537))
- Clean up some of the federation event authentication code for clarity. ([\matrix-org#10539](matrix-org#10539), [\matrix-org#10591](matrix-org#10591))
- Convert `Transaction` and `Edu` objects to attrs. ([\matrix-org#10542](matrix-org#10542))
- Update `/batch_send` endpoint to only return `state_events` created by the `state_events_from_before` passed in. ([\matrix-org#10552](matrix-org#10552))
- Update contributing.md to warn against rebasing an open PR. ([\matrix-org#10563](matrix-org#10563))
- Remove the unused public rooms replication stream. ([\matrix-org#10565](matrix-org#10565))
- Clarify error message when failing to join a restricted room. ([\matrix-org#10572](matrix-org#10572))
- Remove references to BuildKite in favour of GitHub Actions. ([\matrix-org#10573](matrix-org#10573))
- Move `/batch_send` endpoint defined by [MSC2716](matrix-org/matrix-spec-proposals#2716) to the `/v2_alpha` directory. ([\matrix-org#10576](matrix-org#10576))
- Allow multiple custom directories in `read_templates`. ([\matrix-org#10587](matrix-org#10587))
- Re-organize the `synapse.federation.transport.server` module to create smaller files. ([\matrix-org#10590](matrix-org#10590))
- Flatten the `synapse.rest.client` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\matrix-org#10600](matrix-org#10600))
- Build Debian packages for Debian 12 (Bookworm). ([\matrix-org#10612](matrix-org#10612))
- Fix up a couple of links to the database schema documentation. ([\matrix-org#10620](matrix-org#10620))
- Fix a broken link to the upgrade notes. ([\matrix-org#10631](matrix-org#10631))
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 19, 2021
Synapse 1.47.0 (2021-11-17)
===========================

No significant changes since 1.47.0rc3.


Synapse 1.47.0rc3 (2021-11-16)
==============================

Bugfixes
--------

- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\#11346](matrix-org/synapse#11346))
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\#11303](matrix-org/synapse#11303), [\#11353](matrix-org/synapse#11353))


Synapse 1.47.0rc2 (2021-11-10)
==============================

This fixes an issue with publishing the Debian packages for 1.47.0rc1.
It is otherwise identical to 1.47.0rc1.


Synapse 1.47.0rc1 (2021-11-09)
==============================

Deprecations and Removals
-------------------------

- The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\#11206](matrix-org/synapse#11206))
- Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\#11213](matrix-org/synapse#11213))


Features
--------

- Advertise support for Client-Server API r0.6.1. ([\#11097](matrix-org/synapse#11097))
- Add search by room ID and room alias to the List Room admin API. ([\#11099](matrix-org/synapse#11099))
- Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\#11126](matrix-org/synapse#11126))
- Add a module API method to update a user's membership in a room. ([\#11147](matrix-org/synapse#11147))
- Add metrics for thread pool usage. ([\#11178](matrix-org/synapse#11178))
- Support the stable room type field for [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\#11187](matrix-org/synapse#11187))
- Add a module API method to retrieve the current state of a room. ([\#11204](matrix-org/synapse#11204))
- Calculate a default value for `public_baseurl` based on `server_name`. ([\#11210](matrix-org/synapse#11210))
- Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\#11211](matrix-org/synapse#11211))
- Add admin APIs to pause, start and check the status of background updates. ([\#11263](matrix-org/synapse#11263))


Bugfixes
--------

- Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\#10097](matrix-org/synapse#10097))
- Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\#10969](matrix-org/synapse#10969), [\#11212](matrix-org/synapse#11212))
- Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\#11033](matrix-org/synapse#11033))
- Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\#11129](matrix-org/synapse#11129))
- Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\#11188](matrix-org/synapse#11188))
- Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\#11191](matrix-org/synapse#11191))
- Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\#11199](matrix-org/synapse#11199))
- Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\#11200](matrix-org/synapse#11200))
- Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\#11207](matrix-org/synapse#11207))
- Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\#11217](matrix-org/synapse#11217))
- Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\#11234](matrix-org/synapse#11234))
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\#11240](matrix-org/synapse#11240))
- Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\#11255](matrix-org/synapse#11255), [\#11276](matrix-org/synapse#11276))
- Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\#11262](matrix-org/synapse#11262))
- Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\#11157](matrix-org/synapse#11157))


Updates to the Docker image
---------------------------

- Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\#11209](matrix-org/synapse#11209))


Improved Documentation
----------------------

- Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\#11128](matrix-org/synapse#11128))
- Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\#11151](matrix-org/synapse#11151))
- Clarify lack of support for Windows. ([\#11198](matrix-org/synapse#11198))
- Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\#11221](matrix-org/synapse#11221))
- Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\#11257](matrix-org/synapse#11257))


Internal Changes
----------------

- Add type annotations for the `log_function` decorator. ([\#10943](matrix-org/synapse#10943))
- Add type hints to `synapse.events`. ([\#11098](matrix-org/synapse#11098))
- Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\#11137](matrix-org/synapse#11137))
- Add type hints so that `synapse.http` passes `mypy` checks. ([\#11164](matrix-org/synapse#11164))
- Update scripts to pass Shellcheck lints. ([\#11166](matrix-org/synapse#11166))
- Add knock information in admin export. Contributed by Rafael Gonçalves. ([\#11171](matrix-org/synapse#11171))
- Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\#11179](matrix-org/synapse#11179))
- Refactor `Filter` to check different fields depending on the data type. ([\#11194](matrix-org/synapse#11194))
- Improve type hints for the relations datastore. ([\#11205](matrix-org/synapse#11205))
- Replace outdated links in the pull request checklist with links to the rendered documentation. ([\#11225](matrix-org/synapse#11225))
- Fix a bug in unit test `test_block_room_and_not_purge`. ([\#11226](matrix-org/synapse#11226))
- In `ObservableDeferred`, run observers in the order they were registered. ([\#11229](matrix-org/synapse#11229))
- Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\#11231](matrix-org/synapse#11231))
- Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\#11233](matrix-org/synapse#11233))
- Allow `stream_writers.typing` config to be a list of one worker. ([\#11237](matrix-org/synapse#11237))
- Remove debugging statement in tests. ([\#11239](matrix-org/synapse#11239))
- Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) historical messages backfilling in random order on remote homeservers. ([\#11244](matrix-org/synapse#11244))
- Add an additional test for the `cachedList` method decorator. ([\#11246](matrix-org/synapse#11246))
- Make minor correction to the type of `auth_checkers` callbacks. ([\#11253](matrix-org/synapse#11253))
- Clean up trivial aspects of the Debian package build tooling. ([\#11269](matrix-org/synapse#11269), [\#11273](matrix-org/synapse#11273))
- Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\#11270](matrix-org/synapse#11270))


Synapse 1.46.0 (2021-11-02)
===========================

The cause of the [performance regression affecting Synapse 1.44](matrix-org/synapse#11049) has been identified and fixed. ([\#11177](matrix-org/synapse#11177))

Bugfixes
--------

- Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. ([\#11196](matrix-org/synapse#11196))


Synapse 1.46.0rc1 (2021-10-27)
==============================

Features
--------

- Add support for Ubuntu 21.10 "Impish Indri". ([\#11024](matrix-org/synapse#11024))
- Port the Password Auth Providers module interface to the new generic interface. ([\#10548](matrix-org/synapse#10548), [\#11180](matrix-org/synapse#11180))
- Experimental support for the thread relation defined in [MSC3440](matrix-org/matrix-spec-proposals#3440). ([\#11088](matrix-org/synapse#11088), [\#11181](matrix-org/synapse#11181), [\#11192](matrix-org/synapse#11192))
- Users admin API can now also modify user type in addition to allowing it to be set on user creation. ([\#11174](matrix-org/synapse#11174))


Bugfixes
--------

- Newly-created public rooms are now only assigned an alias if the room's creation has not been blocked by permission settings. Contributed by @AndrewFerr. ([\#10930](matrix-org/synapse#10930))
- Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#11001](matrix-org/synapse#11001), [\#11009](matrix-org/synapse#11009), [\#11012](matrix-org/synapse#11012))
- Fix 500 error on `/messages` when the server accumulates more than 5 backwards extremities at a given depth for a room. ([\#11027](matrix-org/synapse#11027))
- Fix a bug where setting a user's `external_id` via the admin API returns 500 and deletes user's existing external mappings if that external ID is already mapped. ([\#11051](matrix-org/synapse#11051))
- Fix a long-standing bug where users excluded from the user directory were added into the directory if they belonged to a room which became public or private. ([\#11075](matrix-org/synapse#11075))
- Fix a long-standing bug when attempting to preview URLs which are in the `windows-1252` character encoding. ([\#11077](matrix-org/synapse#11077), [\#11089](matrix-org/synapse#11089))
- Fix broken export-data admin command and add test script checking the command to CI. ([\#11078](matrix-org/synapse#11078))
- Show an error when timestamp in seconds is provided to the `/purge_media_cache` Admin API. ([\#11101](matrix-org/synapse#11101))
- Fix local users who left all their rooms being removed from the user directory, even if the `search_all_users` config option was enabled. ([\#11103](matrix-org/synapse#11103))
- Fix a bug which caused the module API's `get_user_ip_and_agents` function to always fail on workers. `get_user_ip_and_agents` was introduced in 1.44.0 and did not function correctly on worker processes at the time. ([\#11112](matrix-org/synapse#11112))
- Identity server connection is no longer ignoring `ip_range_whitelist`. ([\#11120](matrix-org/synapse#11120))
- Fix a bug introduced in Synapse 1.45.0 breaking the configuration file parsing script. ([\#11145](matrix-org/synapse#11145))
- Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests. ([\#11177](matrix-org/synapse#11177), [\#11190](matrix-org/synapse#11190))
- Resolve and share `state_groups` for all [MSC2716](matrix-org/matrix-spec-proposals#2716) historical events in batch. ([\#10975](matrix-org/synapse#10975))


Improved Documentation
----------------------

- Fix broken links relating to module API deprecation in the upgrade notes. ([\#11069](matrix-org/synapse#11069))
- Add more information about what happens when a user is deactivated. ([\#11083](matrix-org/synapse#11083))
- Clarify the the sample log config can be copied from the documentation without issue. ([\#11092](matrix-org/synapse#11092))
- Update the admin API documentation with an updated list of the characters allowed in registration tokens. ([\#11093](matrix-org/synapse#11093))
- Document Synapse's behaviour when dealing with multiple modules registering the same callbacks and/or handlers for the same HTTP endpoints. ([\#11096](matrix-org/synapse#11096))
- Fix instances of `[example]{.title-ref}` in the upgrade documentation as a result of prior RST to Markdown conversion. ([\#11118](matrix-org/synapse#11118))
- Document the version of Synapse each module callback was introduced in. ([\#11132](matrix-org/synapse#11132))
- Document the version of Synapse that introduced each module API method. ([\#11183](matrix-org/synapse#11183))


Internal Changes
----------------
- Fix spurious warnings about losing the logging context on the `ReplicationCommandHandler` when losing the replication connection. ([\#10984](matrix-org/synapse#10984))
- Include rejected status when we log events. ([\#11008](matrix-org/synapse#11008))
- Add some extra logging to the event persistence code. ([\#11014](matrix-org/synapse#11014))
- Rearrange the internal workings of the incremental user directory updates. ([\#11035](matrix-org/synapse#11035))
- Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room. ([\#11143](matrix-org/synapse#11143))
- Add and improve type hints. ([\#10972](matrix-org/synapse#10972), [\#11055](matrix-org/synapse#11055), [\#11066](matrix-org/synapse#11066), [\#11076](matrix-org/synapse#11076), [\#11095](matrix-org/synapse#11095), [\#11109](matrix-org/synapse#11109), [\#11121](matrix-org/synapse#11121), [\#11146](matrix-org/synapse#11146))
- Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse. ([\#11054](matrix-org/synapse#11054))
- Remove dead code from `MediaFilePaths`. ([\#11056](matrix-org/synapse#11056))
- Be more lenient when parsing oEmbed response versions. ([\#11065](matrix-org/synapse#11065))
- Create a separate module for the retention configuration. ([\#11070](matrix-org/synapse#11070))
- Clean up some of the federation event authentication code for clarity. ([\#11115](matrix-org/synapse#11115), [\#11116](matrix-org/synapse#11116), [\#11122](matrix-org/synapse#11122))
- Add docstrings and comments to the application service ephemeral event sending code. ([\#11138](matrix-org/synapse#11138))
- Update the `sign_json` script to support inline configuration of the signing key. ([\#11139](matrix-org/synapse#11139))
- Fix broken link in the docker image README. ([\#11144](matrix-org/synapse#11144))
- Always dump logs from unit tests during CI runs. ([\#11068](matrix-org/synapse#11068))
- Add tests for `MediaFilePaths` class. ([\#11057](matrix-org/synapse#11057))
- Simplify the user admin API tests. ([\#11048](matrix-org/synapse#11048))
- Add a test for the workaround introduced in [\#11042](matrix-org/synapse#11042) concerning the behaviour of third-party rule modules and `SynapseError`s. ([\#11071](matrix-org/synapse#11071))


Synapse 1.45.1 (2021-10-20)
===========================

Bugfixes
--------

- Revert change to counting of deactivated users towards the monthly active users limit, introduced in 1.45.0rc1. ([\#11127](matrix-org/synapse#11127))


Synapse 1.45.0 (2021-10-19)
===========================

No functional changes since Synapse 1.45.0rc2.

Known Issues
------------

- A suspected [performance regression](matrix-org/synapse#11049) which was first reported after the release of 1.44.0 remains unresolved.

  We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

Improved Documentation
----------------------

- Reword changelog to clarify concerns about a suspected performance regression in 1.44.0. ([\#11117](matrix-org/synapse#11117))


Synapse 1.45.0rc2 (2021-10-14)
==============================

This release candidate [fixes](matrix-org/synapse#11053) a user directory [bug](matrix-org/synapse#11025) present in 1.45.0rc1.

Known Issues
------------

- A suspected [performance regression](matrix-org/synapse#11049) which was first reported after the release of 1.44.0 remains unresolved.

  We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

Bugfixes
--------

- Fix a long-standing bug when using multiple event persister workers where events were not correctly sent down `/sync` due to a race. ([\#11045](matrix-org/synapse#11045))
- Fix a bug introduced in Synapse 1.45.0rc1 where the user directory would stop updating if it processed an event from a
  user not in the `users` table. ([\#11053](matrix-org/synapse#11053))
- Fix a bug introduced in Synapse 1.44.0 when logging errors during oEmbed processing. ([\#11061](matrix-org/synapse#11061))


Internal Changes
----------------

- Add an 'approximate difference' method to `StateFilter`. ([\#10825](matrix-org/synapse#10825))
- Fix inconsistent behavior of `get_last_client_by_ip` when reporting data that has not been stored in the database yet. ([\#10970](matrix-org/synapse#10970))
- Fix a bug introduced in Synapse 1.21.0 that causes opentracing and Prometheus metrics for replication requests to be measured incorrectly. ([\#10996](matrix-org/synapse#10996))
- Ensure that cache config tests do not share state. ([\#11036](matrix-org/synapse#11036))


Synapse 1.45.0rc1 (2021-10-12)
==============================

**Note:** Media storage providers module that read from Synapse's configuration need changes as of this version, see the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450) for more information.

Known Issues
------------

- We are investigating [a performance issue](matrix-org/synapse#11049) which was reported after the release of 1.44.0.
- We are aware of [a bug](matrix-org/synapse#11025) with the user directory when using application services. A second release candidate is expected which will resolve this.

Features
--------

- Add [MSC3069](matrix-org/matrix-spec-proposals#3069) support to `/account/whoami`. ([\#9655](matrix-org/synapse#9655))
- Support autodiscovery of oEmbed previews. ([\#10822](matrix-org/synapse#10822))
- Add a `user_may_send_3pid_invite` spam checker callback for modules to allow or deny 3PID invites. ([\#10894](matrix-org/synapse#10894))
- Add a spam checker callback to allow or deny room joins. ([\#10910](matrix-org/synapse#10910))
- Include an `update_synapse_database` script in the distribution. Contributed by @Fizzadar at Beeper. ([\#10954](matrix-org/synapse#10954))
- Include exception information in JSON logging output. Contributed by @Fizzadar at Beeper. ([\#11028](matrix-org/synapse#11028))


Bugfixes
--------

- Fix a minor bug in the response to `/_matrix/client/r0/voip/turnServer`. Contributed by @lukaslihotzki. ([\#10922](matrix-org/synapse#10922))
- Fix a bug where empty `yyyy-mm-dd/` directories would be left behind in the media store's `url_cache_thumbnails/` directory. ([\#10924](matrix-org/synapse#10924))
- Fix a bug introduced in Synapse v1.40.0 where the signature checks for room version 8 and 9 could be applied to earlier room versions in some situations. ([\#10927](matrix-org/synapse#10927))
- Fix a long-standing bug wherein deactivated users still count towards the monthly active users limit. ([\#10947](matrix-org/synapse#10947))
- Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#10956](matrix-org/synapse#10956))
- Fix a long-standing bug where rebuilding the user directory wouldn't exclude support and deactivated users. ([\#10960](matrix-org/synapse#10960))
- Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint rejecting subsequent batches with unknown batch ID error in existing room versions from the room creator. ([\#10962](matrix-org/synapse#10962))
- Fix a bug that could leak local users' per-room nicknames and avatars when the user directory is rebuilt. ([\#10981](matrix-org/synapse#10981))
- Fix a long-standing bug where the remainder of a batch of user directory changes would be silently dropped if the server left a room early in the batch. ([\#10982](matrix-org/synapse#10982))
- Correct a bugfix introduced in Synapse v1.44.0 that would catch the wrong error if a connection is lost before a response could be written to it. ([\#10995](matrix-org/synapse#10995))
- Fix a long-standing bug where local users' per-room nicknames/avatars were visible to anyone who could see you in the user directory. ([\#11002](matrix-org/synapse#11002))
- Fix a long-standing bug where a user's per-room nickname/avatar would overwrite their profile in the user directory when a room was made public. ([\#11003](matrix-org/synapse#11003))
- Work around a regression, introduced in Synapse v1.39.0, that caused `SynapseError`s raised by the experimental third-party rules module callback `check_event_allowed` to be ignored. ([\#11042](matrix-org/synapse#11042))
- Fix a bug in [MSC2716](matrix-org/matrix-spec-proposals#2716) insertion events in rooms that could cause cross-talk/conflicts between batches. ([\#10877](matrix-org/synapse#10877))


Improved Documentation
----------------------

- Change wording ("reference homeserver") in Synapse repository documentation. Contributed by @maxkratz. ([\#10971](matrix-org/synapse#10971))
- Fix a dead URL in development documentation (SAML) and change wording from "Riot" to "Element". Contributed by @maxkratz. ([\#10973](matrix-org/synapse#10973))
- Add additional content to the Welcome and Overview page of the documentation. ([\#10990](matrix-org/synapse#10990))
- Update links to MSCs in documentation. Contributed by @dklimpel. ([\#10991](matrix-org/synapse#10991))


Internal Changes
----------------

- Improve type hinting in `synapse.util`. ([\#10888](matrix-org/synapse#10888))
- Add further type hints to `synapse.storage.util`. ([\#10892](matrix-org/synapse#10892))
- Fix type hints to be compatible with an upcoming change to Twisted. ([\#10895](matrix-org/synapse#10895))
- Update utility code to handle C implementations of frozendict. ([\#10902](matrix-org/synapse#10902))
- Drop old functionality which maintained database compatibility with Synapse versions before v1.31. ([\#10903](matrix-org/synapse#10903))
- Clean-up configuration helper classes for the `ServerConfig` class. ([\#10915](matrix-org/synapse#10915))
- Use direct references to config flags. ([\#10916](matrix-org/synapse#10916), [\#10959](matrix-org/synapse#10959), [\#10985](matrix-org/synapse#10985))
- Clean up some of the federation event authentication code for clarity. ([\#10926](matrix-org/synapse#10926), [\#10940](matrix-org/synapse#10940), [\#10986](matrix-org/synapse#10986), [\#10987](matrix-org/synapse#10987), [\#10988](matrix-org/synapse#10988), [\#11010](matrix-org/synapse#11010), [\#11011](matrix-org/synapse#11011))
- Refactor various parts of the codebase to use `RoomVersion` objects instead of room version identifier strings. ([\#10934](matrix-org/synapse#10934))
- Refactor user directory tests in preparation for upcoming changes. ([\#10935](matrix-org/synapse#10935))
- Include the event id in the logcontext when handling PDUs received over federation. ([\#10936](matrix-org/synapse#10936))
- Fix logged errors in unit tests. ([\#10939](matrix-org/synapse#10939))
- Fix a broken test to ensure that consent configuration works during registration. ([\#10945](matrix-org/synapse#10945))
- Add type hints to filtering classes. ([\#10958](matrix-org/synapse#10958))
- Add type-hint to `HomeserverTestcase.setup_test_homeserver`. ([\#10961](matrix-org/synapse#10961))
- Fix the test utility function `create_room_as` so that `is_public=True` will explicitly set the `visibility` parameter of room creation requests to `public`. Contributed by @AndrewFerr. ([\#10963](matrix-org/synapse#10963))
- Make the release script more robust and transparent. ([\#10966](matrix-org/synapse#10966))
- Refactor [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` mega function into smaller handler functions. ([\#10974](matrix-org/synapse#10974))
- Log stack traces when a missing opentracing span is detected. ([\#10983](matrix-org/synapse#10983))
- Update GHA config to run tests against Python 3.10 and PostgreSQL 14. ([\#10992](matrix-org/synapse#10992))
- Fix a long-standing bug where `ReadWriteLock`s could drop logging contexts on exit. ([\#10993](matrix-org/synapse#10993))
- Add a `CODEOWNERS` file to automatically request reviews from the `@matrix-org/synapse-core` team on new pull requests. ([\#10994](matrix-org/synapse#10994))
- Add further type hints to `synapse.state`. ([\#11004](matrix-org/synapse#11004))
- Remove the deprecated `BaseHandler` object. ([\#11005](matrix-org/synapse#11005))
- Bump mypy version for CI to 0.910, and pull in new type stubs for dependencies. ([\#11006](matrix-org/synapse#11006))
- Fix CI to run the unit tests without optional deps. ([\#11017](matrix-org/synapse#11017))
- Ensure that cache config tests do not share state. ([\#11019](matrix-org/synapse#11019))
- Add additional type hints to `synapse.server_notices`. ([\#11021](matrix-org/synapse#11021))
- Add additional type hints for `synapse.push`. ([\#11023](matrix-org/synapse#11023))
- When installing the optional developer dependencies, also include the dependencies needed for type-checking and unit testing. ([\#11034](matrix-org/synapse#11034))
- Remove unnecessary list comprehension from `synapse_port_db` to satisfy code style requirements. ([\#11043](matrix-org/synapse#11043))


Synapse 1.44.0 (2021-10-05)
===========================

No significant changes since 1.44.0rc3.


Synapse 1.44.0rc3 (2021-10-04)
==============================

Bugfixes
--------

- Fix a bug introduced in Synapse v1.40.0 where changing a user's display name or avatar in a restricted room would cause an authentication error. ([\#10933](matrix-org/synapse#10933))
- Fix `/admin/whois/{user_id}` endpoint, which was broken in v1.44.0rc1. ([\#10968](matrix-org/synapse#10968))


Synapse 1.44.0rc2 (2021-09-30)
==============================

Bugfixes
--------

- Fix a bug introduced in v1.44.0rc1 which caused the experimental [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint to return a 500 error. ([\#10938](matrix-org/synapse#10938))
- Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. ([\#10944](matrix-org/synapse#10944))


Improved Documentation
----------------------

- Minor updates to the installation instructions. ([\#10919](matrix-org/synapse#10919))


Synapse 1.44.0rc1 (2021-09-29)
==============================

Features
--------

- Only allow the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send?chunk_id=xxx` endpoint to connect to an already existing insertion event. ([\#10776](matrix-org/synapse#10776))
- Improve oEmbed URL previews by processing the author name, photo, and video information. ([\#10814](matrix-org/synapse#10814), [\#10819](matrix-org/synapse#10819))
- Speed up responding with large JSON objects to requests. ([\#10868](matrix-org/synapse#10868), [\#10905](matrix-org/synapse#10905))
- Add a `user_may_create_room_with_invites` spam checker callback to allow modules to allow or deny a room creation request based on the invites and/or 3PID invites it includes. ([\#10898](matrix-org/synapse#10898))


Bugfixes
--------

- Fix a long-standing bug that caused an `AssertionError` when purging history in certain rooms. Contributed by @Kokokokoka. ([\#10690](matrix-org/synapse#10690))
- Fix a long-standing bug which caused deactivated users that were later reactivated to be missing from the user directory. ([\#10782](matrix-org/synapse#10782))
- Fix a long-standing bug that caused unbanning a user by sending a membership event to fail. Contributed by @aaronraimist. ([\#10807](matrix-org/synapse#10807))
- Fix a long-standing bug where logging contexts would go missing when federation requests time out. ([\#10810](matrix-org/synapse#10810))
- Fix a long-standing bug causing an error in the deprecated `/initialSync` endpoint when using the undocumented `from` and `to` parameters. ([\#10827](matrix-org/synapse#10827))
- Fix a bug causing the `remove_stale_pushers` background job to repeatedly fail and log errors. This bug affected Synapse servers that had been upgraded from version 1.28 or older and are using SQLite. ([\#10843](matrix-org/synapse#10843))
- Fix a long-standing bug in Unicode support of the room search admin API breaking search for rooms with non-ASCII characters. ([\#10859](matrix-org/synapse#10859))
- Fix a bug introduced in Synapse 1.37.0 which caused `knock` membership events which we sent to remote servers to be incorrectly stored in the local database. ([\#10873](matrix-org/synapse#10873))
- Fix invalidating one-time key count cache after claiming keys. The bug was introduced in Synapse v1.41.0. Contributed by Tulir at Beeper. ([\#10875](matrix-org/synapse#10875))
- Fix a long-standing bug causing application service users to be subject to MAU blocking if the MAU limit had been reached, even if configured not to be blocked. ([\#10881](matrix-org/synapse#10881))
- Fix a long-standing bug which could cause events pulled over federation to be incorrectly rejected. ([\#10907](matrix-org/synapse#10907))
- Fix a long-standing bug causing URL cache files to be stored in storage providers. Server admins may safely delete the `url_cache/` and `url_cache_thumbnails/` directories from any configured storage providers to reclaim space. ([\#10911](matrix-org/synapse#10911))
- Fix a long-standing bug leading to race conditions when creating media store and config directories. ([\#10913](matrix-org/synapse#10913))


Improved Documentation
----------------------

- Fix some crashes in the Module API example code, by adding JSON encoding/decoding. ([\#10845](matrix-org/synapse#10845))
- Add developer documentation about experimental configuration flags. ([\#10865](matrix-org/synapse#10865))
- Properly remove deleted files from GitHub pages when generating the documentation. ([\#10869](matrix-org/synapse#10869))


Internal Changes
----------------

- Fix GitHub Actions config so we can run sytest on synapse from parallel branches. ([\#10659](matrix-org/synapse#10659))
- Split out [MSC2716](matrix-org/matrix-spec-proposals#2716) meta events to their own fields in the `/batch_send` response. ([\#10777](matrix-org/synapse#10777))
- Add missing type hints to REST servlets. ([\#10785](matrix-org/synapse#10785), [\#10817](matrix-org/synapse#10817))
- Simplify the internal logic which maintains the user directory database tables. ([\#10796](matrix-org/synapse#10796))
- Use direct references to config flags. ([\#10812](matrix-org/synapse#10812), [\#10885](matrix-org/synapse#10885), [\#10893](matrix-org/synapse#10893), [\#10897](matrix-org/synapse#10897))
- Specify the type of token in generic "Invalid token" error messages. ([\#10815](matrix-org/synapse#10815))
- Make `StateFilter` frozen so it is hashable. ([\#10816](matrix-org/synapse#10816))
- Fix a long-standing bug where an `m.room.message` event containing a null byte would cause an internal server error. ([\#10820](matrix-org/synapse#10820))
- Add type hints to the state database. ([\#10823](matrix-org/synapse#10823))
- Opt out of cache expiry for `get_users_who_share_room_with_user`, to hopefully improve `/sync` performance when you
  haven't synced recently. ([\#10826](matrix-org/synapse#10826))
- Track cache eviction rates more finely in Prometheus's monitoring. ([\#10829](matrix-org/synapse#10829))
- Add missing type hints to `synapse.handlers`. ([\#10831](matrix-org/synapse#10831), [\#10856](matrix-org/synapse#10856))
- Extend the Module API to let plug-ins check whether an ID is local and to access IP + User Agent data. ([\#10833](matrix-org/synapse#10833))
- Factor out PNG image data to a constant to be used in several tests. ([\#10834](matrix-org/synapse#10834))
- Add a test to ensure state events sent by modules get persisted correctly. ([\#10835](matrix-org/synapse#10835))
- Rename [MSC2716](matrix-org/matrix-spec-proposals#2716) fields and event types from `chunk` to `batch` to match the `/batch_send` endpoint. ([\#10838](matrix-org/synapse#10838))
- Rename [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` query parameter from `?prev_event` to more obvious usage with `?prev_event_id`. ([\#10839](matrix-org/synapse#10839))
- Add type hints to `synapse.http.site`. ([\#10867](matrix-org/synapse#10867))
- Include outlier status when we log V2 or V3 events. ([\#10879](matrix-org/synapse#10879))
- Break down Grafana's cache expiry time series based on reason for eviction, c.f. [\#10829](matrix-org/synapse#10829). ([\#10880](matrix-org/synapse#10880))
- Clean up some of the federation event authentication code for clarity. ([\#10883](matrix-org/synapse#10883), [\#10884](matrix-org/synapse#10884), [\#10896](matrix-org/synapse#10896), [\#10901](matrix-org/synapse#10901))
- Allow the `.` and `~` characters when creating registration tokens as per the change to [MSC3231](matrix-org/matrix-spec-proposals#3231). ([\#10887](matrix-org/synapse#10887))
- Clean up some unnecessary parentheses in places around the codebase. ([\#10889](matrix-org/synapse#10889))
- Improve type hinting in the user directory code. ([\#10891](matrix-org/synapse#10891))
- Update development testing script `test_postgresql.sh` to use a supported Python version and make re-runs quicker. ([\#10906](matrix-org/synapse#10906))
- Document and summarize changes in schema version `61` – `64`. ([\#10917](matrix-org/synapse#10917))
- Update release script to sign the newly created git tags. ([\#10925](matrix-org/synapse#10925))
- Fix Debian builds due to `dh-virtualenv` no longer being able to build their docs. ([\#10931](matrix-org/synapse#10931))
aaronraimist added a commit to aaronraimist/synapse that referenced this pull request Nov 22, 2021
Synapse 1.47.0 (2021-11-17)
===========================

No significant changes since 1.47.0rc3.

Synapse 1.47.0rc3 (2021-11-16)
==============================

Bugfixes
--------

- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\matrix-org#11346](matrix-org#11346))
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\matrix-org#11303](matrix-org#11303), [\matrix-org#11353](matrix-org#11353))

Synapse 1.47.0rc2 (2021-11-10)
==============================

This fixes an issue with publishing the Debian packages for 1.47.0rc1.
It is otherwise identical to 1.47.0rc1.

Synapse 1.47.0rc1 (2021-11-09)
==============================

Deprecations and Removals
-------------------------

- The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\matrix-org#11206](matrix-org#11206))
- Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\matrix-org#11213](matrix-org#11213))

Features
--------

- Advertise support for Client-Server API r0.6.1. ([\matrix-org#11097](matrix-org#11097))
- Add search by room ID and room alias to the List Room admin API. ([\matrix-org#11099](matrix-org#11099))
- Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\matrix-org#11126](matrix-org#11126))
- Add a module API method to update a user's membership in a room. ([\matrix-org#11147](matrix-org#11147))
- Add metrics for thread pool usage. ([\matrix-org#11178](matrix-org#11178))
- Support the stable room type field for [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\matrix-org#11187](matrix-org#11187))
- Add a module API method to retrieve the current state of a room. ([\matrix-org#11204](matrix-org#11204))
- Calculate a default value for `public_baseurl` based on `server_name`. ([\matrix-org#11210](matrix-org#11210))
- Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\matrix-org#11211](matrix-org#11211))
- Add admin APIs to pause, start and check the status of background updates. ([\matrix-org#11263](matrix-org#11263))

Bugfixes
--------

- Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\matrix-org#10097](matrix-org#10097))
- Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\matrix-org#10969](matrix-org#10969), [\matrix-org#11212](matrix-org#11212))
- Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\matrix-org#11033](matrix-org#11033))
- Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\matrix-org#11129](matrix-org#11129))
- Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\matrix-org#11188](matrix-org#11188))
- Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\matrix-org#11191](matrix-org#11191))
- Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\matrix-org#11199](matrix-org#11199))
- Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\matrix-org#11200](matrix-org#11200))
- Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\matrix-org#11207](matrix-org#11207))
- Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\matrix-org#11217](matrix-org#11217))
- Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\matrix-org#11234](matrix-org#11234))
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\matrix-org#11240](matrix-org#11240))
- Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\matrix-org#11255](matrix-org#11255), [\matrix-org#11276](matrix-org#11276))
- Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\matrix-org#11262](matrix-org#11262))
- Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\matrix-org#11157](matrix-org#11157))

Updates to the Docker image
---------------------------

- Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\matrix-org#11209](matrix-org#11209))

Improved Documentation
----------------------

- Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\matrix-org#11128](matrix-org#11128))
- Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\matrix-org#11151](matrix-org#11151))
- Clarify lack of support for Windows. ([\matrix-org#11198](matrix-org#11198))
- Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\matrix-org#11221](matrix-org#11221))
- Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\matrix-org#11257](matrix-org#11257))

Internal Changes
----------------

- Add type annotations for the `log_function` decorator. ([\matrix-org#10943](matrix-org#10943))
- Add type hints to `synapse.events`. ([\matrix-org#11098](matrix-org#11098))
- Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\matrix-org#11137](matrix-org#11137))
- Add type hints so that `synapse.http` passes `mypy` checks. ([\matrix-org#11164](matrix-org#11164))
- Update scripts to pass Shellcheck lints. ([\matrix-org#11166](matrix-org#11166))
- Add knock information in admin export. Contributed by Rafael Gonçalves. ([\matrix-org#11171](matrix-org#11171))
- Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\matrix-org#11179](matrix-org#11179))
- Refactor `Filter` to check different fields depending on the data type. ([\matrix-org#11194](matrix-org#11194))
- Improve type hints for the relations datastore. ([\matrix-org#11205](matrix-org#11205))
- Replace outdated links in the pull request checklist with links to the rendered documentation. ([\matrix-org#11225](matrix-org#11225))
- Fix a bug in unit test `test_block_room_and_not_purge`. ([\matrix-org#11226](matrix-org#11226))
- In `ObservableDeferred`, run observers in the order they were registered. ([\matrix-org#11229](matrix-org#11229))
- Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\matrix-org#11231](matrix-org#11231))
- Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\matrix-org#11233](matrix-org#11233))
- Allow `stream_writers.typing` config to be a list of one worker. ([\matrix-org#11237](matrix-org#11237))
- Remove debugging statement in tests. ([\matrix-org#11239](matrix-org#11239))
- Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) historical messages backfilling in random order on remote homeservers. ([\matrix-org#11244](matrix-org#11244))
- Add an additional test for the `cachedList` method decorator. ([\matrix-org#11246](matrix-org#11246))
- Make minor correction to the type of `auth_checkers` callbacks. ([\matrix-org#11253](matrix-org#11253))
- Clean up trivial aspects of the Debian package build tooling. ([\matrix-org#11269](matrix-org#11269), [\matrix-org#11273](matrix-org#11273))
- Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\matrix-org#11270](matrix-org#11270))

Signed-off-by: Aaron Raimist <aaron@raim.ist>
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 24, 2021
chat/matrix-synapse: security update

Revisions pulled up:
- chat/matrix-synapse/Makefile                                  1.34-1.36
- chat/matrix-synapse/PLIST                                     1.18-1.19
- chat/matrix-synapse/distinfo                                  1.24,1.27-1.28

-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   js
   Date:           Sat Oct  2 12:23:13 UTC 2021

   Modified Files:
           pkgsrc/chat/matrix-synapse: Makefile PLIST distinfo

   Log Message:
   Update chat/matrix-synapse to 1.43.0

   Synapse 1.43.0 (2021-09-21)
   =============
   This release drops support for the deprecated, unstable API for [MSC2858 (Multiple SSO Identity
   Providers)](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix), as well as the undocumented `experimental.msc2858_enabled` config
   option. Client authors should update their clients to use the stable API, available since Synapse 1.30.

   The documentation has been updated with configuration for routing `/spaces`, `/hierarchy` and `/summary` to workers. See [the upgrade
   notes](https://github.com/matrix-org/synapse/blob/release-v1.43/docs/upgrade.md#upgrading-to-v1430) for more details.

   No significant changes since 1.43.0rc2.

   Synapse 1.43.0rc2 (2021-09-17)
   ===============

   Bugfixes
   --------

   - Added opentracing logging to help debug [\#9424](https://github.com/matrix-org/synapse/issues/9424). ([\#10828](https://github.com/matrix-org/synapse/issues/10828))

   Synapse 1.43.0rc1 (2021-09-14)
   ===============

   Features
   --------

   - Allow room creators to send historical events specified by [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) in existing room versions.
   ([\#10566](https://github.com/matrix-org/synapse/issues/10566))
   - Add config option to use non-default manhole password and keys. ([\#10643](https://github.com/matrix-org/synapse/issues/10643))
   - Skip final GC at shutdown to improve restart performance. ([\#10712](https://github.com/matrix-org/synapse/issues/10712))
   - Allow configuration of the oEmbed URLs used for URL previews. ([\#10714](https://github.com/matrix-org/synapse/issues/10714), [\#10759](https://github.com/matrix-org/synapse/issues/10759))
   - Prefer [room version 9](https://github.com/matrix-org/matrix-doc/pull/3375) for restricted rooms per the [room version capabilities](https://github.com/matrix-org/matrix-doc/pull/3244) API.
   ([\#10772](https://github.com/matrix-org/synapse/issues/10772))

   Bugfixes
   --------

   - Fix a long-standing bug where room avatars were not included in email notifications. ([\#10658](https://github.com/matrix-org/synapse/issues/10658))
   - Fix a bug where the ordering algorithm was skipping the `origin_server_ts` step in the spaces summary resulting in unstable room orderings.
   ([\#10730](https://github.com/matrix-org/synapse/issues/10730))
   - Fix edge case when persisting events into a room where there are multiple events we previously hadn't calculated auth chains for (and hadn't marked as needing to be calculated).
   ([\#10743](https://github.com/matrix-org/synapse/issues/10743))
   - Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes. ([\#10757](https://github.com/matrix-org/synapse/issues/10757))
   - Fix a bug which prevented user registration via SSO to require consent tracking for SSO mapping providers that don't prompt for Matrix ID selection. Contributed by @AndrewFerr.
   ([\#10733](https://github.com/matrix-org/synapse/issues/10733))
   - Only return the stripped state events for the `m.space.child` events in a room for the spaces summary from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946).
   ([\#10760](https://github.com/matrix-org/synapse/issues/10760))
   - Properly handle room upgrades of spaces. ([\#10774](https://github.com/matrix-org/synapse/issues/10774))
   - Fix a bug which generated invalid homeserver config when the `frontend_proxy` worker type was passed to the Synapse Worker-based Complement image.
   ([\#10783](https://github.com/matrix-org/synapse/issues/10783))

   Improved Documentation
   ----------------------

   - Minor fix to the `media_repository` developer documentation. Contributed by @cuttingedge1109. ([\#10556](https://github.com/matrix-org/synapse/issues/10556))
   - Update the documentation to note that the `/spaces` and `/hierarchy` endpoints can be routed to workers. ([\#10648](https://github.com/matrix-org/synapse/issues/10648))
   - Clarify admin API documentation on undoing room deletions. ([\#10735](https://github.com/matrix-org/synapse/issues/10735))
   - Split up the modules documentation and add examples for module developers. ([\#10758](https://github.com/matrix-org/synapse/issues/10758))
   - Correct 2 typographical errors in the [Log Contexts documentation](https://matrix-org.github.io/synapse/latest/log_contexts.html). ([\#10795](https://github.com/matrix-org/synapse/issues/10795))
   - Fix a wording mistake in the sample configuration. Contributed by @bramvdnheuvel:nltrix.net. ([\#10804](https://github.com/matrix-org/synapse/issues/10804))

   Deprecations and Removals
   -------------------------

   - Remove the [unstable MSC2858 API](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix), including the undocumented
   `experimental.msc2858_enabled` config option. The unstable API has been deprecated since Synapse 1.35. Client authors should update their clients to use the stable API introduced in Synapse 1.30 if
   they have not already done so. ([\#10693](https://github.com/matrix-org/synapse/issues/10693))

   Internal Changes
   ----------------

   - Add OpenTracing logging to help debug stuck messages (as described by issue [#9424](https://github.com/matrix-org/synapse/issues/9424)).
   ([\#10704](https://github.com/matrix-org/synapse/issues/10704))
   - Add type annotations to the `synapse.util` package. ([\#10601](https://github.com/matrix-org/synapse/issues/10601))
   - Ensure `rooms.creator` field is always populated for easy lookup in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) usage later.
   ([\#10697](https://github.com/matrix-org/synapse/issues/10697))
   - Add missing type hints to REST servlets. ([\#10707](https://github.com/matrix-org/synapse/issues/10707), [\#10728](https://github.com/matrix-org/synapse/issues/10728),
   [\#10736](https://github.com/matrix-org/synapse/issues/10736))
   - Do not include rooms with unknown room versions in the spaces summary results. ([\#10727](https://github.com/matrix-org/synapse/issues/10727))
   - Additional error checking for the `preset` field when creating a room. ([\#10738](https://github.com/matrix-org/synapse/issues/10738))
   - Clean up some of the federation event authentication code for clarity. ([\#10744](https://github.com/matrix-org/synapse/issues/10744), [\#10745](https://github.com/matrix-org/synapse/issues/10745),
   [\#10746](https://github.com/matrix-org/synapse/issues/10746), [\#10771](https://github.com/matrix-org/synapse/issues/10771), [\#10773](https://github.com/matrix-org/synapse/issues/10773),
   [\#10781](https://github.com/matrix-org/synapse/issues/10781))
   - Add an index to `presence_stream` to hopefully speed up startups a little. ([\#10748](https://github.com/matrix-org/synapse/issues/10748))
   - Refactor event size checking code to simplify searching the codebase for the origins of certain error strings that are occasionally emitted.
   ([\#10750](https://github.com/matrix-org/synapse/issues/10750))
   - Move tests relating to rooms having encryption out of the user directory tests. ([\#10752](https://github.com/matrix-org/synapse/issues/10752))
   - Use `attrs` internally for the URL preview code & update documentation. ([\#10753](https://github.com/matrix-org/synapse/issues/10753))
   - Minor speed ups when joining large rooms over federation. ([\#10754](https://github.com/matrix-org/synapse/issues/10754), [\#10755](https://github.com/matrix-org/synapse/issues/10755),
   [\#10756](https://github.com/matrix-org/synapse/issues/10756), [\#10780](https://github.com/matrix-org/synapse/issues/10780), [\#10784](https://github.com/matrix-org/synapse/issues/10784))
   - Add a constant for `m.federate`. ([\#10775](https://github.com/matrix-org/synapse/issues/10775))
   - Add a script to update the Debian changelog in a Docker container for systems that are not Debian-based. ([\#10778](https://github.com/matrix-org/synapse/issues/10778))
   - Change the format of authenticated users in logs when a user is being puppeted by and admin user. ([\#10779](https://github.com/matrix-org/synapse/issues/10779))
   - Remove fixed and flakey tests from the Sytest blacklist. ([\#10788](https://github.com/matrix-org/synapse/issues/10788))
   - Improve internal details of the user directory code. ([\#10789](https://github.com/matrix-org/synapse/issues/10789))
   - Use direct references to config flags. ([\#10798](https://github.com/matrix-org/synapse/issues/10798))
   - Ensure the Rust reporter passes type checking with jaeger-client 4.7's type annotations. ([\#10799](https://github.com/matrix-org/synapse/issues/10799))

   Synapse 1.42.0 (2021-09-07)
   =============
   This version of Synapse removes deprecated room-management admin APIs, removes out-of-date email pushers, and improves error handling for fallback templates for user-interactive authentication. For
   more information on these points, server administrators are encouraged to read [the upgrade notes](docs/upgrade.md#upgrading-to-v1420).

   No significant changes since 1.42.0rc2.

   Synapse 1.42.0rc2 (2021-09-06)
   ===============

   Features
   --------

   - Support room version 9 from [MSC3375](https://github.com/matrix-org/matrix-doc/pull/3375). ([\#10747](https://github.com/matrix-org/synapse/issues/10747))

   Internal Changes
   ----------------

   - Print a warning when using one of the deprecated `template_dir` settings. ([\#10768](https://github.com/matrix-org/synapse/issues/10768))

   Synapse 1.42.0rc1 (2021-09-01)
   ===============

   Features
   --------

   - Add support for [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231): Token authenticated registration. Users can be required to submit a token during registration to authenticate
   themselves. Contributed by Callum Brown. ([\#10142](https://github.com/matrix-org/synapse/issues/10142))
   - Add support for [MSC3283](https://github.com/matrix-org/matrix-doc/pull/3283): Expose `enable_set_displayname` in capabilities. ([\#10452](https://github.com/matrix-org/synapse/issues/10452))
   - Port the `PresenceRouter` module interface to the new generic interface. ([\#10524](https://github.com/matrix-org/synapse/issues/10524))
   - Add pagination to the spaces summary based on updates to [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946). ([\#10613](https://github.com/matrix-org/synapse/issues/10613),
   [\#10725](https://github.com/matrix-org/synapse/issues/10725))

   Bugfixes
   --------

   - Validate new `m.room.power_levels` events. Contributed by @aaronraimist. ([\#10232](https://github.com/matrix-org/synapse/issues/10232))
   - Display an error on User-Interactive Authentication fallback pages when authentication fails. Contributed by Callum Brown. ([\#10561](https://github.com/matrix-org/synapse/issues/10561))
   - Remove pushers when deleting an e-mail address from an account. Pushers for old unlinked emails will also be deleted. ([\#10581](https://github.com/matrix-org/synapse/issues/10581),
   [\#10734](https://github.com/matrix-org/synapse/issues/10734))
   - Reject Client-Server `/keys/query` requests which provide `device_ids` incorrectly. ([\#10593](https://github.com/matrix-org/synapse/issues/10593))
   - Rooms with unsupported room versions are no longer returned via `/sync`. ([\#10644](https://github.com/matrix-org/synapse/issues/10644))
   - Enforce the maximum length for per-room display names and avatar URLs. ([\#10654](https://github.com/matrix-org/synapse/issues/10654))
   - Fix a bug which caused the `synapse_user_logins_total` Prometheus metric not to be correctly initialised on restart. ([\#10677](https://github.com/matrix-org/synapse/issues/10677))
   - Improve `ServerNoticeServlet` to avoid duplicate requests and add unit tests. ([\#10679](https://github.com/matrix-org/synapse/issues/10679))
   - Fix long-standing issue which caused an error when a thumbnail is requested and there are multiple thumbnails with the same quality rating.
   ([\#10684](https://github.com/matrix-org/synapse/issues/10684))
   - Fix a regression introduced in v1.41.0 which affected the performance of concurrent fetches of large sets of events, in extreme cases causing the process to hang.
   ([\#10703](https://github.com/matrix-org/synapse/issues/10703))
   - Fix a regression introduced in Synapse 1.41 which broke email transmission on Systems using older versions of the Twisted library. ([\#10713](https://github.com/matrix-org/synapse/issues/10713))

   Improved Documentation
   ----------------------

   - Add documentation on how to connect Django with Synapse using OpenID Connect and django-oauth-toolkit. Contributed by @HugoDelval. ([\#10192](https://github.com/matrix-org/synapse/issues/10192))
   - Advertise https://matrix-org.github.io/synapse documentation in the `README` and `CONTRIBUTING` files. ([\#10595](https://github.com/matrix-org/synapse/issues/10595))
   - Fix some of the titles not rendering in the OpenID Connect documentation. ([\#10639](https://github.com/matrix-org/synapse/issues/10639))
   - Minor clarifications to the documentation for reverse proxies. ([\#10708](https://github.com/matrix-org/synapse/issues/10708))
   - Remove table of contents from the top of installation and contributing documentation pages. ([\#10711](https://github.com/matrix-org/synapse/issues/10711))

   Deprecations and Removals
   -------------------------

   - Remove deprecated Shutdown Room and Purge Room Admin API. ([\#8830](https://github.com/matrix-org/synapse/issues/8830))

   Internal Changes
   ----------------

   - Improve type hints for the proxy agent and SRV resolver modules. Contributed by @dklimpel. ([\#10608](https://github.com/matrix-org/synapse/issues/10608))
   - Clean up some of the federation event authentication code for clarity. ([\#10614](https://github.com/matrix-org/synapse/issues/10614), [\#10615](https://github.com/matrix-org/synapse/issues/10615),
   [\#10624](https://github.com/matrix-org/synapse/issues/10624), [\#10640](https://github.com/matrix-org/synapse/issues/10640))
   - Add a comment asking developers to leave a reason when bumping the database schema version. ([\#10621](https://github.com/matrix-org/synapse/issues/10621))
   - Remove not needed database updates in modify user admin API. ([\#10627](https://github.com/matrix-org/synapse/issues/10627))
   - Convert room member storage tuples to `attrs` classes. ([\#10629](https://github.com/matrix-org/synapse/issues/10629), [\#10642](https://github.com/matrix-org/synapse/issues/10642))
   - Use auto-attribs for the attrs classes used in sync. ([\#10630](https://github.com/matrix-org/synapse/issues/10630))
   - Make `backfill` and `get_missing_events` use the same codepath. ([\#10645](https://github.com/matrix-org/synapse/issues/10645))
   - Improve the performance of the `/hierarchy` API (from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946)) by caching responses received over federation.
   ([\#10647](https://github.com/matrix-org/synapse/issues/10647))
   - Run a nightly CI build against Twisted trunk. ([\#10651](https://github.com/matrix-org/synapse/issues/10651), [\#10672](https://github.com/matrix-org/synapse/issues/10672))
   - Do not print out stack traces for network errors when fetching data over federation. ([\#10662](https://github.com/matrix-org/synapse/issues/10662))
   - Simplify tests for device admin rest API. ([\#10664](https://github.com/matrix-org/synapse/issues/10664))
   - Add missing type hints to REST servlets. ([\#10665](https://github.com/matrix-org/synapse/issues/10665), [\#10666](https://github.com/matrix-org/synapse/issues/10666),
   [\#10674](https://github.com/matrix-org/synapse/issues/10674))
   - Flatten the `tests.synapse.rests` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\#10667](https://github.com/matrix-org/synapse/issues/10667))
   - Update `complement.sh` to rebuild the base Docker image when run with workers. ([\#10686](https://github.com/matrix-org/synapse/issues/10686))
   - Split the event-processing methods in `FederationHandler` into a separate `FederationEventHandler`. ([\#10692](https://github.com/matrix-org/synapse/issues/10692))
   - Remove unused `compare_digest` function. ([\#10706](https://github.com/matrix-org/synapse/issues/10706))


   To generate a diff of this commit:
   cvs rdiff -u -r1.33 -r1.34 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.17 -r1.18 pkgsrc/chat/matrix-synapse/PLIST
   cvs rdiff -u -r1.23 -r1.24 pkgsrc/chat/matrix-synapse/distinfo

-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   js
   Date:           Fri Nov 19 14:06:08 UTC 2021

   Modified Files:
           pkgsrc/chat/matrix-synapse: Makefile PLIST distinfo

   Log Message:
   Update chat/matrix-synapse to 1.47.0

   Synapse 1.47.0 (2021-11-17)
   =============
   No significant changes since 1.47.0rc3.

   Synapse 1.47.0rc3 (2021-11-16)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations.
   ([\#11346](https://github.com/matrix-org/synapse/issues/11346))
   - Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version.
   ([\#11303](https://github.com/matrix-org/synapse/issues/11303), [\#11353](https://github.com/matrix-org/synapse/issues/11353))

   Synapse 1.47.0rc2 (2021-11-10)
   ===============

   This fixes an issue with publishing the Debian packages for 1.47.0rc1.
   It is otherwise identical to 1.47.0rc1.

   Synapse 1.47.0rc1 (2021-11-09)
   ===============

   Deprecations and Removals
   -------------------------

   - The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more
   information. ([\#11206](https://github.com/matrix-org/synapse/issues/11206))
   - Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\#11213](https://github.com/matrix-org/synapse/issues/11213))

   Features
   --------

   - Advertise support for Client-Server API r0.6.1. ([\#11097](https://github.com/matrix-org/synapse/issues/11097))
   - Add search by room ID and room alias to the List Room admin API. ([\#11099](https://github.com/matrix-org/synapse/issues/11099))
   - Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\#11126](https://github.com/matrix-org/synapse/issues/11126))
   - Add a module API method to update a user's membership in a room. ([\#11147](https://github.com/matrix-org/synapse/issues/11147))
   - Add metrics for thread pool usage. ([\#11178](https://github.com/matrix-org/synapse/issues/11178))
   - Support the stable room type field for [MSC3288](https://github.com/matrix-org/matrix-doc/pull/3288). ([\#11187](https://github.com/matrix-org/synapse/issues/11187))
   - Add a module API method to retrieve the current state of a room. ([\#11204](https://github.com/matrix-org/synapse/issues/11204))
   - Calculate a default value for `public_baseurl` based on `server_name`. ([\#11210](https://github.com/matrix-org/synapse/issues/11210))
   - Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\#11211](https://github.com/matrix-org/synapse/issues/11211))
   - Add admin APIs to pause, start and check the status of background updates. ([\#11263](https://github.com/matrix-org/synapse/issues/11263))

   Bugfixes
   --------

   - Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\#10097](https://github.com/matrix-org/synapse/issues/10097))
   - Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine.
   ([\#10969](https://github.com/matrix-org/synapse/issues/10969), [\#11212](https://github.com/matrix-org/synapse/issues/11212))
   - Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\#11033](https://github.com/matrix-org/synapse/issues/11033))
   - Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver.
   ([\#11129](https://github.com/matrix-org/synapse/issues/11129))
   - Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint and the author of the historical
   messages is already part of the current room state at the given `?prev_event_id`. ([\#11188](https://github.com/matrix-org/synapse/issues/11188))
   - Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p.
   ([\#11191](https://github.com/matrix-org/synapse/issues/11191))
   - Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\#11199](https://github.com/matrix-org/synapse/issues/11199))
   - Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\#11200](https://github.com/matrix-org/synapse/issues/11200))
   - Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at
   Beeper. ([\#11207](https://github.com/matrix-org/synapse/issues/11207))
   - Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\#11217](https://github.com/matrix-org/synapse/issues/11217))
   - Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried.
   ([\#11234](https://github.com/matrix-org/synapse/issues/11234))
   - Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection.
   ([\#11240](https://github.com/matrix-org/synapse/issues/11240))
   - Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\#11255](https://github.com/matrix-org/synapse/issues/11255),
   [\#11276](https://github.com/matrix-org/synapse/issues/11276))
   - Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed.
   ([\#11262](https://github.com/matrix-org/synapse/issues/11262))
   - Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu.
   ([\#11157](https://github.com/matrix-org/synapse/issues/11157))

   Updates to the Docker image
   ---------------------------

   - Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\#11209](https://github.com/matrix-org/synapse/issues/11209))

   Improved Documentation
   ----------------------

   - Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly.
   ([\#11128](https://github.com/matrix-org/synapse/issues/11128))
   - Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\#11151](https://github.com/matrix-org/synapse/issues/11151))
   - Clarify lack of support for Windows. ([\#11198](https://github.com/matrix-org/synapse/issues/11198))
   - Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\#11221](https://github.com/matrix-org/synapse/issues/11221))
   - Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\#11257](https://github.com/matrix-org/synapse/issues/11257))

   Internal Changes
   ----------------

   - Add type annotations for the `log_function` decorator. ([\#10943](https://github.com/matrix-org/synapse/issues/10943))
   - Add type hints to `synapse.events`. ([\#11098](https://github.com/matrix-org/synapse/issues/11098))
   - Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\#11137](https://github.com/matrix-org/synapse/issues/11137))
   - Add type hints so that `synapse.http` passes `mypy` checks. ([\#11164](https://github.com/matrix-org/synapse/issues/11164))
   - Update scripts to pass Shellcheck lints. ([\#11166](https://github.com/matrix-org/synapse/issues/11166))
   - Add knock information in admin export. Contributed by Rafael Gonçalves. ([\#11171](https://github.com/matrix-org/synapse/issues/11171))
   - Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly.
   ([\#11179](https://github.com/matrix-org/synapse/issues/11179))
   - Refactor `Filter` to check different fields depending on the data type. ([\#11194](https://github.com/matrix-org/synapse/issues/11194))
   - Improve type hints for the relations datastore. ([\#11205](https://github.com/matrix-org/synapse/issues/11205))
   - Replace outdated links in the pull request checklist with links to the rendered documentation. ([\#11225](https://github.com/matrix-org/synapse/issues/11225))
   - Fix a bug in unit test `test_block_room_and_not_purge`. ([\#11226](https://github.com/matrix-org/synapse/issues/11226))
   - In `ObservableDeferred`, run observers in the order they were registered. ([\#11229](https://github.com/matrix-org/synapse/issues/11229))
   - Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\#11231](https://github.com/matrix-org/synapse/issues/11231))
   - Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\#11233](https://github.com/matrix-org/synapse/issues/11233))
   - Allow `stream_writers.typing` config to be a list of one worker. ([\#11237](https://github.com/matrix-org/synapse/issues/11237))
   - Remove debugging statement in tests. ([\#11239](https://github.com/matrix-org/synapse/issues/11239))
   - Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical messages backfilling in random order on remote homeservers.
   ([\#11244](https://github.com/matrix-org/synapse/issues/11244))
   - Add an additional test for the `cachedList` method decorator. ([\#11246](https://github.com/matrix-org/synapse/issues/11246))
   - Make minor correction to the type of `auth_checkers` callbacks. ([\#11253](https://github.com/matrix-org/synapse/issues/11253))
   - Clean up trivial aspects of the Debian package build tooling. ([\#11269](https://github.com/matrix-org/synapse/issues/11269), [\#11273](https://github.com/matrix-org/synapse/issues/11273))
   - Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\#11270](https://github.com/matrix-org/synapse/issues/11270))

   Synapse 1.46.0 (2021-11-02)
   =============
   The cause of the [performance regression affecting Synapse 1.44](https://github.com/matrix-org/synapse/issues/11049) has been identified and fixed.
   ([\#11177](https://github.com/matrix-org/synapse/issues/11177))

   Bugfixes
   --------

   - Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. ([\#11196](https://github.com/matrix-org/synapse/issues/11196))

   Synapse 1.46.0rc1 (2021-10-27)
   ===============

   Features
   --------

   - Add support for Ubuntu 21.10 "Impish Indri". ([\#11024](https://github.com/matrix-org/synapse/issues/11024))
   - Port the Password Auth Providers module interface to the new generic interface. ([\#10548](https://github.com/matrix-org/synapse/issues/10548),
   [\#11180](https://github.com/matrix-org/synapse/issues/11180))
   - Experimental support for the thread relation defined in [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440). ([\#11088](https://github.com/matrix-org/synapse/issues/11088),
   [\#11181](https://github.com/matrix-org/synapse/issues/11181), [\#11192](https://github.com/matrix-org/synapse/issues/11192))
   - Users admin API can now also modify user type in addition to allowing it to be set on user creation. ([\#11174](https://github.com/matrix-org/synapse/issues/11174))

   Bugfixes
   --------

   - Newly-created public rooms are now only assigned an alias if the room's creation has not been blocked by permission settings. Contributed by @AndrewFerr.
   ([\#10930](https://github.com/matrix-org/synapse/issues/10930))
   - Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#11001](https://github.com/matrix-org/synapse/issues/11001),
   [\#11009](https://github.com/matrix-org/synapse/issues/11009), [\#11012](https://github.com/matrix-org/synapse/issues/11012))
   - Fix 500 error on `/messages` when the server accumulates more than 5 backwards extremities at a given depth for a room. ([\#11027](https://github.com/matrix-org/synapse/issues/11027))
   - Fix a bug where setting a user's `external_id` via the admin API returns 500 and deletes user's existing external mappings if that external ID is already mapped.
   ([\#11051](https://github.com/matrix-org/synapse/issues/11051))
   - Fix a long-standing bug where users excluded from the user directory were added into the directory if they belonged to a room which became public or private.
   ([\#11075](https://github.com/matrix-org/synapse/issues/11075))
   - Fix a long-standing bug when attempting to preview URLs which are in the `windows-1252` character encoding. ([\#11077](https://github.com/matrix-org/synapse/issues/11077),
   [\#11089](https://github.com/matrix-org/synapse/issues/11089))
   - Fix broken export-data admin command and add test script checking the command to CI. ([\#11078](https://github.com/matrix-org/synapse/issues/11078))
   - Show an error when timestamp in seconds is provided to the `/purge_media_cache` Admin API. ([\#11101](https://github.com/matrix-org/synapse/issues/11101))
   - Fix local users who left all their rooms being removed from the user directory, even if the `search_all_users` config option was enabled.
   ([\#11103](https://github.com/matrix-org/synapse/issues/11103))
   - Fix a bug which caused the module API's `get_user_ip_and_agents` function to always fail on workers. `get_user_ip_and_agents` was introduced in 1.44.0 and did not function correctly on worker
   processes at the time. ([\#11112](https://github.com/matrix-org/synapse/issues/11112))
   - Identity server connection is no longer ignoring `ip_range_whitelist`. ([\#11120](https://github.com/matrix-org/synapse/issues/11120))
   - Fix a bug introduced in Synapse 1.45.0 breaking the configuration file parsing script. ([\#11145](https://github.com/matrix-org/synapse/issues/11145))
   - Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests.
   ([\#11177](https://github.com/matrix-org/synapse/issues/11177), [\#11190](https://github.com/matrix-org/synapse/issues/11190))
   - Resolve and share `state_groups` for all [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical events in batch. ([\#10975](https://github.com/matrix-org/synapse/issues/10975))

   Improved Documentation
   ----------------------

   - Fix broken links relating to module API deprecation in the upgrade notes. ([\#11069](https://github.com/matrix-org/synapse/issues/11069))
   - Add more information about what happens when a user is deactivated. ([\#11083](https://github.com/matrix-org/synapse/issues/11083))
   - Clarify the the sample log config can be copied from the documentation without issue. ([\#11092](https://github.com/matrix-org/synapse/issues/11092))
   - Update the admin API documentation with an updated list of the characters allowed in registration tokens. ([\#11093](https://github.com/matrix-org/synapse/issues/11093))
   - Document Synapse's behaviour when dealing with multiple modules registering the same callbacks and/or handlers for the same HTTP endpoints.
   ([\#11096](https://github.com/matrix-org/synapse/issues/11096))
   - Fix instances of `[example]{.title-ref}` in the upgrade documentation as a result of prior RST to Markdown conversion. ([\#11118](https://github.com/matrix-org/synapse/issues/11118))
   - Document the version of Synapse each module callback was introduced in. ([\#11132](https://github.com/matrix-org/synapse/issues/11132))
   - Document the version of Synapse that introduced each module API method. ([\#11183](https://github.com/matrix-org/synapse/issues/11183))

   Internal Changes
   ----------------
   - Fix spurious warnings about losing the logging context on the `ReplicationCommandHandler` when losing the replication connection. ([\#10984](https://github.com/matrix-org/synapse/issues/10984))
   - Include rejected status when we log events. ([\#11008](https://github.com/matrix-org/synapse/issues/11008))
   - Add some extra logging to the event persistence code. ([\#11014](https://github.com/matrix-org/synapse/issues/11014))
   - Rearrange the internal workings of the incremental user directory updates. ([\#11035](https://github.com/matrix-org/synapse/issues/11035))
   - Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room.
   ([\#11143](https://github.com/matrix-org/synapse/issues/11143))
   - Add and improve type hints. ([\#10972](https://github.com/matrix-org/synapse/issues/10972), [\#11055](https://github.com/matrix-org/synapse/issues/11055),
   [\#11066](https://github.com/matrix-org/synapse/issues/11066), [\#11076](https://github.com/matrix-org/synapse/issues/11076), [\#11095](https://github.com/matrix-org/synapse/issues/11095),
   [\#11109](https://github.com/matrix-org/synapse/issues/11109), [\#11121](https://github.com/matrix-org/synapse/issues/11121), [\#11146](https://github.com/matrix-org/synapse/issues/11146))
   - Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse.
   ([\#11054](https://github.com/matrix-org/synapse/issues/11054))
   - Remove dead code from `MediaFilePaths`. ([\#11056](https://github.com/matrix-org/synapse/issues/11056))
   - Be more lenient when parsing oEmbed response versions. ([\#11065](https://github.com/matrix-org/synapse/issues/11065))
   - Create a separate module for the retention configuration. ([\#11070](https://github.com/matrix-org/synapse/issues/11070))
   - Clean up some of the federation event authentication code for clarity. ([\#11115](https://github.com/matrix-org/synapse/issues/11115), [\#11116](https://github.com/matrix-org/synapse/issues/11116),
   [\#11122](https://github.com/matrix-org/synapse/issues/11122))
   - Add docstrings and comments to the application service ephemeral event sending code. ([\#11138](https://github.com/matrix-org/synapse/issues/11138))
   - Update the `sign_json` script to support inline configuration of the signing key. ([\#11139](https://github.com/matrix-org/synapse/issues/11139))
   - Fix broken link in the docker image README. ([\#11144](https://github.com/matrix-org/synapse/issues/11144))
   - Always dump logs from unit tests during CI runs. ([\#11068](https://github.com/matrix-org/synapse/issues/11068))
   - Add tests for `MediaFilePaths` class. ([\#11057](https://github.com/matrix-org/synapse/issues/11057))
   - Simplify the user admin API tests. ([\#11048](https://github.com/matrix-org/synapse/issues/11048))
   - Add a test for the workaround introduced in [\#11042](https://github.com/matrix-org/synapse/pull/11042) concerning the behaviour of third-party rule modules and `SynapseError`s.
   ([\#11071](https://github.com/matrix-org/synapse/issues/11071))

   Synapse 1.45.1 (2021-10-20)
   =============
   Bugfixes
   --------

   - Revert change to counting of deactivated users towards the monthly active users limit, introduced in 1.45.0rc1. ([\#11127](https://github.com/matrix-org/synapse/issues/11127))

   Synapse 1.45.0 (2021-10-19)
   =============
   No functional changes since Synapse 1.45.0rc2.

   Known Issues
   ------------

   - A suspected [performance regression](https://github.com/matrix-org/synapse/issues/11049) which was first reported after the release of 1.44.0 remains unresolved.

     We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

   Improved Documentation
   ----------------------

   - Reword changelog to clarify concerns about a suspected performance regression in 1.44.0. ([\#11117](https://github.com/matrix-org/synapse/issues/11117))

   Synapse 1.45.0rc2 (2021-10-14)
   ===============

   This release candidate [fixes](https://github.com/matrix-org/synapse/issues/11053) a user directory [bug](https://github.com/matrix-org/synapse/issues/11025) present in 1.45.0rc1.

   Known Issues
   ------------

   - A suspected [performance regression](https://github.com/matrix-org/synapse/issues/11049) which was first reported after the release of 1.44.0 remains unresolved.

     We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

   Bugfixes
   --------

   - Fix a long-standing bug when using multiple event persister workers where events were not correctly sent down `/sync` due to a race. ([\#11045](https://github.com/matrix-org/synapse/issues/11045))
   - Fix a bug introduced in Synapse 1.45.0rc1 where the user directory would stop updating if it processed an event from a
     user not in the `users` table. ([\#11053](https://github.com/matrix-org/synapse/issues/11053))
   - Fix a bug introduced in Synapse 1.44.0 when logging errors during oEmbed processing. ([\#11061](https://github.com/matrix-org/synapse/issues/11061))

   Internal Changes
   ----------------

   - Add an 'approximate difference' method to `StateFilter`. ([\#10825](https://github.com/matrix-org/synapse/issues/10825))
   - Fix inconsistent behavior of `get_last_client_by_ip` when reporting data that has not been stored in the database yet. ([\#10970](https://github.com/matrix-org/synapse/issues/10970))
   - Fix a bug introduced in Synapse 1.21.0 that causes opentracing and Prometheus metrics for replication requests to be measured incorrectly.
   ([\#10996](https://github.com/matrix-org/synapse/issues/10996))
   - Ensure that cache config tests do not share state. ([\#11036](https://github.com/matrix-org/synapse/issues/11036))

   Synapse 1.45.0rc1 (2021-10-12)
   ===============

   **Note:** Media storage providers module that read from Synapse's configuration need changes as of this version, see the [upgrade
   notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450) for more information.

   Known Issues
   ------------

   - We are investigating [a performance issue](https://github.com/matrix-org/synapse/issues/11049) which was reported after the release of 1.44.0.
   - We are aware of [a bug](https://github.com/matrix-org/synapse/issues/11025) with the user directory when using application services. A second release candidate is expected which will resolve this.

   Features
   --------

   - Add [MSC3069](https://github.com/matrix-org/matrix-doc/pull/3069) support to `/account/whoami`. ([\#9655](https://github.com/matrix-org/synapse/issues/9655))
   - Support autodiscovery of oEmbed previews. ([\#10822](https://github.com/matrix-org/synapse/issues/10822))
   - Add a `user_may_send_3pid_invite` spam checker callback for modules to allow or deny 3PID invites. ([\#10894](https://github.com/matrix-org/synapse/issues/10894))
   - Add a spam checker callback to allow or deny room joins. ([\#10910](https://github.com/matrix-org/synapse/issues/10910))
   - Include an `update_synapse_database` script in the distribution. Contributed by @Fizzadar at Beeper. ([\#10954](https://github.com/matrix-org/synapse/issues/10954))
   - Include exception information in JSON logging output. Contributed by @Fizzadar at Beeper. ([\#11028](https://github.com/matrix-org/synapse/issues/11028))

   Bugfixes
   --------

   - Fix a minor bug in the response to `/_matrix/client/r0/voip/turnServer`. Contributed by @lukaslihotzki. ([\#10922](https://github.com/matrix-org/synapse/issues/10922))
   - Fix a bug where empty `yyyy-mm-dd/` directories would be left behind in the media store's `url_cache_thumbnails/` directory. ([\#10924](https://github.com/matrix-org/synapse/issues/10924))
   - Fix a bug introduced in Synapse v1.40.0 where the signature checks for room version 8 and 9 could be applied to earlier room versions in some situations.
   ([\#10927](https://github.com/matrix-org/synapse/issues/10927))
   - Fix a long-standing bug wherein deactivated users still count towards the monthly active users limit. ([\#10947](https://github.com/matrix-org/synapse/issues/10947))
   - Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#10956](https://github.com/matrix-org/synapse/issues/10956))
   - Fix a long-standing bug where rebuilding the user directory wouldn't exclude support and deactivated users. ([\#10960](https://github.com/matrix-org/synapse/issues/10960))
   - Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint rejecting subsequent batches with unknown batch ID error in existing room versions from the room creator.
   ([\#10962](https://github.com/matrix-org/synapse/issues/10962))
   - Fix a bug that could leak local users' per-room nicknames and avatars when the user directory is rebuilt. ([\#10981](https://github.com/matrix-org/synapse/issues/10981))
   - Fix a long-standing bug where the remainder of a batch of user directory changes would be silently dropped if the server left a room early in the batch.
   ([\#10982](https://github.com/matrix-org/synapse/issues/10982))
   - Correct a bugfix introduced in Synapse v1.44.0 that would catch the wrong error if a connection is lost before a response could be written to it.
   ([\#10995](https://github.com/matrix-org/synapse/issues/10995))
   - Fix a long-standing bug where local users' per-room nicknames/avatars were visible to anyone who could see you in the user directory. ([\#11002](https://github.com/matrix-org/synapse/issues/11002))
   - Fix a long-standing bug where a user's per-room nickname/avatar would overwrite their profile in the user directory when a room was made public.
   ([\#11003](https://github.com/matrix-org/synapse/issues/11003))
   - Work around a regression, introduced in Synapse v1.39.0, that caused `SynapseError`s raised by the experimental third-party rules module callback `check_event_allowed` to be ignored.
   ([\#11042](https://github.com/matrix-org/synapse/issues/11042))
   - Fix a bug in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) insertion events in rooms that could cause cross-talk/conflicts between batches.
   ([\#10877](https://github.com/matrix-org/synapse/issues/10877))

   Improved Documentation
   ----------------------

   - Change wording ("reference homeserver") in Synapse repository documentation. Contributed by @maxkratz. ([\#10971](https://github.com/matrix-org/synapse/issues/10971))
   - Fix a dead URL in development documentation (SAML) and change wording from "Riot" to "Element". Contributed by @maxkratz. ([\#10973](https://github.com/matrix-org/synapse/issues/10973))
   - Add additional content to the Welcome and Overview page of the documentation. ([\#10990](https://github.com/matrix-org/synapse/issues/10990))
   - Update links to MSCs in documentation. Contributed by @dklimpel. ([\#10991](https://github.com/matrix-org/synapse/issues/10991))

   Internal Changes
   ----------------

   - Improve type hinting in `synapse.util`. ([\#10888](https://github.com/matrix-org/synapse/issues/10888))
   - Add further type hints to `synapse.storage.util`. ([\#10892](https://github.com/matrix-org/synapse/issues/10892))
   - Fix type hints to be compatible with an upcoming change to Twisted. ([\#10895](https://github.com/matrix-org/synapse/issues/10895))
   - Update utility code to handle C implementations of frozendict. ([\#10902](https://github.com/matrix-org/synapse/issues/10902))
   - Drop old functionality which maintained database compatibility with Synapse versions before v1.31. ([\#10903](https://github.com/matrix-org/synapse/issues/10903))
   - Clean-up configuration helper classes for the `ServerConfig` class. ([\#10915](https://github.com/matrix-org/synapse/issues/10915))
   - Use direct references to config flags. ([\#10916](https://github.com/matrix-org/synapse/issues/10916), [\#10959](https://github.com/matrix-org/synapse/issues/10959),
   [\#10985](https://github.com/matrix-org/synapse/issues/10985))
   - Clean up some of the federation event authentication code for clarity. ([\#10926](https://github.com/matrix-org/synapse/issues/10926), [\#10940](https://github.com/matrix-org/synapse/issues/10940),
   [\#10986](https://github.com/matrix-org/synapse/issues/10986), [\#10987](https://github.com/matrix-org/synapse/issues/10987), [\#10988](https://github.com/matrix-org/synapse/issues/10988),
   [\#11010](https://github.com/matrix-org/synapse/issues/11010), [\#11011](https://github.com/matrix-org/synapse/issues/11011))
   - Refactor various parts of the codebase to use `RoomVersion` objects instead of room version identifier strings. ([\#10934](https://github.com/matrix-org/synapse/issues/10934))
   - Refactor user directory tests in preparation for upcoming changes. ([\#10935](https://github.com/matrix-org/synapse/issues/10935))
   - Include the event id in the logcontext when handling PDUs received over federation. ([\#10936](https://github.com/matrix-org/synapse/issues/10936))
   - Fix logged errors in unit tests. ([\#10939](https://github.com/matrix-org/synapse/issues/10939))
   - Fix a broken test to ensure that consent configuration works during registration. ([\#10945](https://github.com/matrix-org/synapse/issues/10945))
   - Add type hints to filtering classes. ([\#10958](https://github.com/matrix-org/synapse/issues/10958))
   - Add type-hint to `HomeserverTestcase.setup_test_homeserver`. ([\#10961](https://github.com/matrix-org/synapse/issues/10961))
   - Fix the test utility function `create_room_as` so that `is_public=True` will explicitly set the `visibility` parameter of room creation requests to `public`. Contributed by @AndrewFerr.
   ([\#10963](https://github.com/matrix-org/synapse/issues/10963))
   - Make the release script more robust and transparent. ([\#10966](https://github.com/matrix-org/synapse/issues/10966))
   - Refactor [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` mega function into smaller handler functions. ([\#10974](https://github.com/matrix-org/synapse/issues/10974))
   - Log stack traces when a missing opentracing span is detected. ([\#10983](https://github.com/matrix-org/synapse/issues/10983))
   - Update GHA config to run tests against Python 3.10 and PostgreSQL 14. ([\#10992](https://github.com/matrix-org/synapse/issues/10992))
   - Fix a long-standing bug where `ReadWriteLock`s could drop logging contexts on exit. ([\#10993](https://github.com/matrix-org/synapse/issues/10993))
   - Add a `CODEOWNERS` file to automatically request reviews from the `@matrix-org/synapse-core` team on new pull requests. ([\#10994](https://github.com/matrix-org/synapse/issues/10994))
   - Add further type hints to `synapse.state`. ([\#11004](https://github.com/matrix-org/synapse/issues/11004))
   - Remove the deprecated `BaseHandler` object. ([\#11005](https://github.com/matrix-org/synapse/issues/11005))
   - Bump mypy version for CI to 0.910, and pull in new type stubs for dependencies. ([\#11006](https://github.com/matrix-org/synapse/issues/11006))
   - Fix CI to run the unit tests without optional deps. ([\#11017](https://github.com/matrix-org/synapse/issues/11017))
   - Ensure that cache config tests do not share state. ([\#11019](https://github.com/matrix-org/synapse/issues/11019))
   - Add additional type hints to `synapse.server_notices`. ([\#11021](https://github.com/matrix-org/synapse/issues/11021))
   - Add additional type hints for `synapse.push`. ([\#11023](https://github.com/matrix-org/synapse/issues/11023))
   - When installing the optional developer dependencies, also include the dependencies needed for type-checking and unit testing. ([\#11034](https://github.com/matrix-org/synapse/issues/11034))
   - Remove unnecessary list comprehension from `synapse_port_db` to satisfy code style requirements. ([\#11043](https://github.com/matrix-org/synapse/issues/11043))

   Synapse 1.44.0 (2021-10-05)
   =============
   No significant changes since 1.44.0rc3.

   Synapse 1.44.0rc3 (2021-10-04)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in Synapse v1.40.0 where changing a user's display name or avatar in a restricted room would cause an authentication error.
   ([\#10933](https://github.com/matrix-org/synapse/issues/10933))
   - Fix `/admin/whois/{user_id}` endpoint, which was broken in v1.44.0rc1. ([\#10968](https://github.com/matrix-org/synapse/issues/10968))

   Synapse 1.44.0rc2 (2021-09-30)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in v1.44.0rc1 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error.
   ([\#10938](https://github.com/matrix-org/synapse/issues/10938))
   - Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. ([\#10944](https://github.com/matrix-org/synapse/issues/10944))

   Improved Documentation
   ----------------------

   - Minor updates to the installation instructions. ([\#10919](https://github.com/matrix-org/synapse/issues/10919))

   Synapse 1.44.0rc1 (2021-09-29)
   ===============

   Features
   --------

   - Only allow the [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send?chunk_id=xxx` endpoint to connect to an already existing insertion event.
   ([\#10776](https://github.com/matrix-org/synapse/issues/10776))
   - Improve oEmbed URL previews by processing the author name, photo, and video information. ([\#10814](https://github.com/matrix-org/synapse/issues/10814),
   [\#10819](https://github.com/matrix-org/synapse/issues/10819))
   - Speed up responding with large JSON objects to requests. ([\#10868](https://github.com/matrix-org/synapse/issues/10868), [\#10905](https://github.com/matrix-org/synapse/issues/10905))
   - Add a `user_may_create_room_with_invites` spam checker callback to allow modules to allow or deny a room creation request based on the invites and/or 3PID invites it includes.
   ([\#10898](https://github.com/matrix-org/synapse/issues/10898))

   Bugfixes
   --------

   - Fix a long-standing bug that caused an `AssertionError` when purging history in certain rooms. Contributed by @Kokokokoka. ([\#10690](https://github.com/matrix-org/synapse/issues/10690))
   - Fix a long-standing bug which caused deactivated users that were later reactivated to be missing from the user directory. ([\#10782](https://github.com/matrix-org/synapse/issues/10782))
   - Fix a long-standing bug that caused unbanning a user by sending a membership event to fail. Contributed by @aaronraimist. ([\#10807](https://github.com/matrix-org/synapse/issues/10807))
   - Fix a long-standing bug where logging contexts would go missing when federation requests time out. ([\#10810](https://github.com/matrix-org/synapse/issues/10810))
   - Fix a long-standing bug causing an error in the deprecated `/initialSync` endpoint when using the undocumented `from` and `to` parameters.
   ([\#10827](https://github.com/matrix-org/synapse/issues/10827))
   - Fix a bug causing the `remove_stale_pushers` background job to repeatedly fail and log errors. This bug affected Synapse servers that had been upgraded from version 1.28 or older and are using
   SQLite. ([\#10843](https://github.com/matrix-org/synapse/issues/10843))
   - Fix a long-standing bug in Unicode support of the room search admin API breaking search for rooms with non-ASCII characters. ([\#10859](https://github.com/matrix-org/synapse/issues/10859))
   - Fix a bug introduced in Synapse 1.37.0 which caused `knock` membership events which we sent to remote servers to be incorrectly stored in the local database.
   ([\#10873](https://github.com/matrix-org/synapse/issues/10873))
   - Fix invalidating one-time key count cache after claiming keys. The bug was introduced in Synapse v1.41.0. Contributed by Tulir at Beeper.
   ([\#10875](https://github.com/matrix-org/synapse/issues/10875))
   - Fix a long-standing bug causing application service users to be subject to MAU blocking if the MAU limit had been reached, even if configured not to be blocked.
   ([\#10881](https://github.com/matrix-org/synapse/issues/10881))
   - Fix a long-standing bug which could cause events pulled over federation to be incorrectly rejected. ([\#10907](https://github.com/matrix-org/synapse/issues/10907))
   - Fix a long-standing bug causing URL cache files to be stored in storage providers. Server admins may safely delete the `url_cache/` and `url_cache_thumbnails/` directories from any configured
   storage providers to reclaim space. ([\#10911](https://github.com/matrix-org/synapse/issues/10911))
   - Fix a long-standing bug leading to race conditions when creating media store and config directories. ([\#10913](https://github.com/matrix-org/synapse/issues/10913))

   Improved Documentation
   ----------------------

   - Fix some crashes in the Module API example code, by adding JSON encoding/decoding. ([\#10845](https://github.com/matrix-org/synapse/issues/10845))
   - Add developer documentation about experimental configuration flags. ([\#10865](https://github.com/matrix-org/synapse/issues/10865))
   - Properly remove deleted files from GitHub pages when generating the documentation. ([\#10869](https://github.com/matrix-org/synapse/issues/10869))

   Internal Changes
   ----------------

   - Fix GitHub Actions config so we can run sytest on synapse from parallel branches. ([\#10659](https://github.com/matrix-org/synapse/issues/10659))
   - Split out [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) meta events to their own fields in the `/batch_send` response. ([\#10777](https://github.com/matrix-org/synapse/issues/10777))
   - Add missing type hints to REST servlets. ([\#10785](https://github.com/matrix-org/synapse/issues/10785), [\#10817](https://github.com/matrix-org/synapse/issues/10817))
   - Simplify the internal logic which maintains the user directory database tables. ([\#10796](https://github.com/matrix-org/synapse/issues/10796))
   - Use direct references to config flags. ([\#10812](https://github.com/matrix-org/synapse/issues/10812), [\#10885](https://github.com/matrix-org/synapse/issues/10885),
   [\#10893](https://github.com/matrix-org/synapse/issues/10893), [\#10897](https://github.com/matrix-org/synapse/issues/10897))
   - Specify the type of token in generic "Invalid token" error messages. ([\#10815](https://github.com/matrix-org/synapse/issues/10815))
   - Make `StateFilter` frozen so it is hashable. ([\#10816](https://github.com/matrix-org/synapse/issues/10816))
   - Fix a long-standing bug where an `m.room.message` event containing a null byte would cause an internal server error. ([\#10820](https://github.com/matrix-org/synapse/issues/10820))
   - Add type hints to the state database. ([\#10823](https://github.com/matrix-org/synapse/issues/10823))
   - Opt out of cache expiry for `get_users_who_share_room_with_user`, to hopefully improve `/sync` performance when you
     haven't synced recently. ([\#10826](https://github.com/matrix-org/synapse/issues/10826))
   - Track cache eviction rates more finely in Prometheus's monitoring. ([\#10829](https://github.com/matrix-org/synapse/issues/10829))
   - Add missing type hints to `synapse.handlers`. ([\#10831](https://github.com/matrix-org/synapse/issues/10831), [\#10856](https://github.com/matrix-org/synapse/issues/10856))
   - Extend the Module API to let plug-ins check whether an ID is local and to access IP + User Agent data. ([\#10833](https://github.com/matrix-org/synapse/issues/10833))
   - Factor out PNG image data to a constant to be used in several tests. ([\#10834](https://github.com/matrix-org/synapse/issues/10834))
   - Add a test to ensure state events sent by modules get persisted correctly. ([\#10835](https://github.com/matrix-org/synapse/issues/10835))
   - Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) fields and event types from `chunk` to `batch` to match the `/batch_send` endpoint.
   ([\#10838](https://github.com/matrix-org/synapse/issues/10838))
   - Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` query parameter from `?prev_event` to more obvious usage with `?prev_event_id`.
   ([\#10839](https://github.com/matrix-org/synapse/issues/10839))
   - Add type hints to `synapse.http.site`. ([\#10867](https://github.com/matrix-org/synapse/issues/10867))
   - Include outlier status when we log V2 or V3 events. ([\#10879](https://github.com/matrix-org/synapse/issues/10879))
   - Break down Grafana's cache expiry time series based on reason for eviction, c.f. [\#10829](https://github.com/matrix-org/synapse/issues/10829).
   ([\#10880](https://github.com/matrix-org/synapse/issues/10880))
   - Clean up some of the federation event authentication code for clarity. ([\#10883](https://github.com/matrix-org/synapse/issues/10883), [\#10884](https://github.com/matrix-org/synapse/issues/10884),
   [\#10896](https://github.com/matrix-org/synapse/issues/10896), [\#10901](https://github.com/matrix-org/synapse/issues/10901))
   - Allow the `.` and `~` characters when creating registration tokens as per the change to [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
   ([\#10887](https://github.com/matrix-org/synapse/issues/10887))
   - Clean up some unnecessary parentheses in places around the codebase. ([\#10889](https://github.com/matrix-org/synapse/issues/10889))
   - Improve type hinting in the user directory code. ([\#10891](https://github.com/matrix-org/synapse/issues/10891))
   - Update development testing script `test_postgresql.sh` to use a supported Python version and make re-runs quicker. ([\#10906](https://github.com/matrix-org/synapse/issues/10906))
   - Document and summarize changes in schema version `61` – `64`. ([\#10917](https://github.com/matrix-org/synapse/issues/10917))
   - Update release script to sign the newly created git tags. ([\#10925](https://github.com/matrix-org/synapse/issues/10925))
   - Fix Debian builds due to `dh-virtualenv` no longer being able to build their docs. ([\#10931](https://github.com/matrix-org/synapse/issues/10931))


   To generate a diff of this commit:
   cvs rdiff -u -r1.34 -r1.35 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.18 -r1.19 pkgsrc/chat/matrix-synapse/PLIST
   cvs rdiff -u -r1.26 -r1.27 pkgsrc/chat/matrix-synapse/distinfo

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	gdt
   Date:		Tue Nov 23 12:47:51 UTC 2021

   Modified Files:
   	pkgsrc/chat/matrix-synapse: Makefile distinfo

   Log Message:
   chat/matrix-synapse: Update to 1.47.1 (security)

   Synapse 1.47.1 (2021-11-23)
   ======This release fixes a security issue in the media store, affecting all prior releases of Synapse. Server administrators are encouraged to update Synapse as soon as possible. We are not aware of these vulnerabilities being exploited in the wild.

   Server administrators who are unable to update Synapse may use the workarounds described in the linked GitHub Security Advisory below.

   Security advisory
   -----------------

   The following issue is fixed in 1.47.1.

   - **[GHSA-3hfw-x7gx-437c](https://github.com/matrix-org/synapse/security/advisories/GHSA-3hfw-x7gx-437c) / [CVE-2021-41281](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41281): Path traversal when downloading remote media.**

     Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory, potentially outside the media store directory.

     The last two directories and file name of the path are chosen randomly by Synapse and cannot be controlled by an attacker, which limits the impact.

     Homeservers with the media repository disabled are unaffected. Homeservers configured with a federation whitelist are also unaffected.

     Fixed by [91f2bd090](https://github.com/matrix-org/synapse/commit/91f2bd090).


   To generate a diff of this commit:
   cvs rdiff -u -r1.35 -r1.36 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.27 -r1.28 pkgsrc/chat/matrix-synapse/distinfo
babolivier added a commit to matrix-org/synapse-dinsic that referenced this pull request Dec 6, 2021
Synapse 1.47.0 (2021-11-17)
===========================

No significant changes since 1.47.0rc3.

Synapse 1.47.0rc3 (2021-11-16)
==============================

Bugfixes
--------

- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\#11346](matrix-org/synapse#11346))
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\#11303](matrix-org/synapse#11303), [\#11353](matrix-org/synapse#11353))

Synapse 1.47.0rc2 (2021-11-10)
==============================

This fixes an issue with publishing the Debian packages for 1.47.0rc1.
It is otherwise identical to 1.47.0rc1.

Synapse 1.47.0rc1 (2021-11-09)
==============================

Deprecations and Removals
-------------------------

- The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\#11206](matrix-org/synapse#11206))
- Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\#11213](matrix-org/synapse#11213))

Features
--------

- Advertise support for Client-Server API r0.6.1. ([\#11097](matrix-org/synapse#11097))
- Add search by room ID and room alias to the List Room admin API. ([\#11099](matrix-org/synapse#11099))
- Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\#11126](matrix-org/synapse#11126))
- Add a module API method to update a user's membership in a room. ([\#11147](matrix-org/synapse#11147))
- Add metrics for thread pool usage. ([\#11178](matrix-org/synapse#11178))
- Support the stable room type field for [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\#11187](matrix-org/synapse#11187))
- Add a module API method to retrieve the current state of a room. ([\#11204](matrix-org/synapse#11204))
- Calculate a default value for `public_baseurl` based on `server_name`. ([\#11210](matrix-org/synapse#11210))
- Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\#11211](matrix-org/synapse#11211))
- Add admin APIs to pause, start and check the status of background updates. ([\#11263](matrix-org/synapse#11263))

Bugfixes
--------

- Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\#10097](matrix-org/synapse#10097))
- Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\#10969](matrix-org/synapse#10969), [\#11212](matrix-org/synapse#11212))
- Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\#11033](matrix-org/synapse#11033))
- Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\#11129](matrix-org/synapse#11129))
- Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\#11188](matrix-org/synapse#11188))
- Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\#11191](matrix-org/synapse#11191))
- Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\#11199](matrix-org/synapse#11199))
- Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\#11200](matrix-org/synapse#11200))
- Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\#11207](matrix-org/synapse#11207))
- Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\#11217](matrix-org/synapse#11217))
- Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\#11234](matrix-org/synapse#11234))
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\#11240](matrix-org/synapse#11240))
- Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\#11255](matrix-org/synapse#11255), [\#11276](matrix-org/synapse#11276))
- Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\#11262](matrix-org/synapse#11262))
- Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\#11157](matrix-org/synapse#11157))

Updates to the Docker image
---------------------------

- Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\#11209](matrix-org/synapse#11209))

Improved Documentation
----------------------

- Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\#11128](matrix-org/synapse#11128))
- Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\#11151](matrix-org/synapse#11151))
- Clarify lack of support for Windows. ([\#11198](matrix-org/synapse#11198))
- Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\#11221](matrix-org/synapse#11221))
- Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\#11257](matrix-org/synapse#11257))

Internal Changes
----------------

- Add type annotations for the `log_function` decorator. ([\#10943](matrix-org/synapse#10943))
- Add type hints to `synapse.events`. ([\#11098](matrix-org/synapse#11098))
- Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\#11137](matrix-org/synapse#11137))
- Add type hints so that `synapse.http` passes `mypy` checks. ([\#11164](matrix-org/synapse#11164))
- Update scripts to pass Shellcheck lints. ([\#11166](matrix-org/synapse#11166))
- Add knock information in admin export. Contributed by Rafael Gonçalves. ([\#11171](matrix-org/synapse#11171))
- Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\#11179](matrix-org/synapse#11179))
- Refactor `Filter` to check different fields depending on the data type. ([\#11194](matrix-org/synapse#11194))
- Improve type hints for the relations datastore. ([\#11205](matrix-org/synapse#11205))
- Replace outdated links in the pull request checklist with links to the rendered documentation. ([\#11225](matrix-org/synapse#11225))
- Fix a bug in unit test `test_block_room_and_not_purge`. ([\#11226](matrix-org/synapse#11226))
- In `ObservableDeferred`, run observers in the order they were registered. ([\#11229](matrix-org/synapse#11229))
- Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\#11231](matrix-org/synapse#11231))
- Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\#11233](matrix-org/synapse#11233))
- Allow `stream_writers.typing` config to be a list of one worker. ([\#11237](matrix-org/synapse#11237))
- Remove debugging statement in tests. ([\#11239](matrix-org/synapse#11239))
- Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) historical messages backfilling in random order on remote homeservers. ([\#11244](matrix-org/synapse#11244))
- Add an additional test for the `cachedList` method decorator. ([\#11246](matrix-org/synapse#11246))
- Make minor correction to the type of `auth_checkers` callbacks. ([\#11253](matrix-org/synapse#11253))
- Clean up trivial aspects of the Debian package build tooling. ([\#11269](matrix-org/synapse#11269), [\#11273](matrix-org/synapse#11273))
- Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\#11270](matrix-org/synapse#11270))
@turt2live turt2live self-assigned this Dec 30, 2021
turt2live added a commit that referenced this pull request Dec 31, 2021
MSCs:
* #3288
* #2946
* #1772

Note that this makes modifications to the underlying MSCs as well. These are intended to be minor edits to aid clarity/accuracy of the MSCs, as per the proposal process. Functionally, clients and servers might need to change their behaviour slightly as is expected of implementing this stuff early. Synapse has these changes (alongside backwards compatibility) here: matrix-org/synapse#11667
turt2live added a commit that referenced this pull request Dec 31, 2021
MSCs:
* #3288
* #2946
* #1772

Note that this makes modifications to the underlying MSCs as well. These are intended to be minor edits to aid clarity/accuracy of the MSCs, as per the proposal process. Functionally, clients and servers might need to change their behaviour slightly as is expected of implementing this stuff early. Synapse has these changes (alongside backwards compatibility) here: matrix-org/synapse#11667
@turt2live
Copy link
Member

Spec PR: #3610

@turt2live turt2live added spec-pr-in-review A proposal which has been PR'd against the spec and is in review and removed spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec labels Dec 31, 2021
Fizzadar pushed a commit to Fizzadar/synapse that referenced this pull request Jan 5, 2022
Synapse 1.47.0 (2021-11-17)
===========================

No significant changes since 1.47.0rc3.

Synapse 1.47.0rc3 (2021-11-16)
==============================

Bugfixes
--------

- Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations. ([\matrix-org#11346](matrix-org#11346))
- Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version. ([\matrix-org#11303](matrix-org#11303), [\matrix-org#11353](matrix-org#11353))

Synapse 1.47.0rc2 (2021-11-10)
==============================

This fixes an issue with publishing the Debian packages for 1.47.0rc1.
It is otherwise identical to 1.47.0rc1.

Synapse 1.47.0rc1 (2021-11-09)
==============================

Deprecations and Removals
-------------------------

- The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more information. ([\matrix-org#11206](matrix-org#11206))
- Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\matrix-org#11213](matrix-org#11213))

Features
--------

- Advertise support for Client-Server API r0.6.1. ([\matrix-org#11097](matrix-org#11097))
- Add search by room ID and room alias to the List Room admin API. ([\matrix-org#11099](matrix-org#11099))
- Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\matrix-org#11126](matrix-org#11126))
- Add a module API method to update a user's membership in a room. ([\matrix-org#11147](matrix-org#11147))
- Add metrics for thread pool usage. ([\matrix-org#11178](matrix-org#11178))
- Support the stable room type field for [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\matrix-org#11187](matrix-org#11187))
- Add a module API method to retrieve the current state of a room. ([\matrix-org#11204](matrix-org#11204))
- Calculate a default value for `public_baseurl` based on `server_name`. ([\matrix-org#11210](matrix-org#11210))
- Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\matrix-org#11211](matrix-org#11211))
- Add admin APIs to pause, start and check the status of background updates. ([\matrix-org#11263](matrix-org#11263))

Bugfixes
--------

- Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\matrix-org#10097](matrix-org#10097))
- Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine. ([\matrix-org#10969](matrix-org#10969), [\matrix-org#11212](matrix-org#11212))
- Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\matrix-org#11033](matrix-org#11033))
- Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver. ([\matrix-org#11129](matrix-org#11129))
- Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` endpoint and the author of the historical messages is already part of the current room state at the given `?prev_event_id`. ([\matrix-org#11188](matrix-org#11188))
- Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p. ([\matrix-org#11191](matrix-org#11191))
- Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\matrix-org#11199](matrix-org#11199))
- Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\matrix-org#11200](matrix-org#11200))
- Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at Beeper. ([\matrix-org#11207](matrix-org#11207))
- Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\matrix-org#11217](matrix-org#11217))
- Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried. ([\matrix-org#11234](matrix-org#11234))
- Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection. ([\matrix-org#11240](matrix-org#11240))
- Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\matrix-org#11255](matrix-org#11255), [\matrix-org#11276](matrix-org#11276))
- Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed. ([\matrix-org#11262](matrix-org#11262))
- Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu. ([\matrix-org#11157](matrix-org#11157))

Updates to the Docker image
---------------------------

- Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\matrix-org#11209](matrix-org#11209))

Improved Documentation
----------------------

- Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly. ([\matrix-org#11128](matrix-org#11128))
- Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\matrix-org#11151](matrix-org#11151))
- Clarify lack of support for Windows. ([\matrix-org#11198](matrix-org#11198))
- Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\matrix-org#11221](matrix-org#11221))
- Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\matrix-org#11257](matrix-org#11257))

Internal Changes
----------------

- Add type annotations for the `log_function` decorator. ([\matrix-org#10943](matrix-org#10943))
- Add type hints to `synapse.events`. ([\matrix-org#11098](matrix-org#11098))
- Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\matrix-org#11137](matrix-org#11137))
- Add type hints so that `synapse.http` passes `mypy` checks. ([\matrix-org#11164](matrix-org#11164))
- Update scripts to pass Shellcheck lints. ([\matrix-org#11166](matrix-org#11166))
- Add knock information in admin export. Contributed by Rafael Gonçalves. ([\matrix-org#11171](matrix-org#11171))
- Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly. ([\matrix-org#11179](matrix-org#11179))
- Refactor `Filter` to check different fields depending on the data type. ([\matrix-org#11194](matrix-org#11194))
- Improve type hints for the relations datastore. ([\matrix-org#11205](matrix-org#11205))
- Replace outdated links in the pull request checklist with links to the rendered documentation. ([\matrix-org#11225](matrix-org#11225))
- Fix a bug in unit test `test_block_room_and_not_purge`. ([\matrix-org#11226](matrix-org#11226))
- In `ObservableDeferred`, run observers in the order they were registered. ([\matrix-org#11229](matrix-org#11229))
- Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\matrix-org#11231](matrix-org#11231))
- Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\matrix-org#11233](matrix-org#11233))
- Allow `stream_writers.typing` config to be a list of one worker. ([\matrix-org#11237](matrix-org#11237))
- Remove debugging statement in tests. ([\matrix-org#11239](matrix-org#11239))
- Fix [MSC2716](matrix-org/matrix-spec-proposals#2716) historical messages backfilling in random order on remote homeservers. ([\matrix-org#11244](matrix-org#11244))
- Add an additional test for the `cachedList` method decorator. ([\matrix-org#11246](matrix-org#11246))
- Make minor correction to the type of `auth_checkers` callbacks. ([\matrix-org#11253](matrix-org#11253))
- Clean up trivial aspects of the Debian package build tooling. ([\matrix-org#11269](matrix-org#11269), [\matrix-org#11273](matrix-org#11273))
- Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\matrix-org#11270](matrix-org#11270))
richvdh pushed a commit that referenced this pull request Jan 11, 2022
MSCs:
* #3288
* #2946
* #1772

Note that this makes modifications to the underlying MSCs as well. These are intended to be minor edits to aid clarity/accuracy of the MSCs, as per the proposal process. Functionally, clients and servers might need to change their behaviour slightly as is expected of implementing this stuff early. Synapse has these changes (alongside backwards compatibility) here: matrix-org/synapse#11667
turt2live added a commit that referenced this pull request Jan 17, 2022
* First iteration of specifying Spaces

MSCs:
* #3288
* #2946
* #1772

Note that this makes modifications to the underlying MSCs as well. These are intended to be minor edits to aid clarity/accuracy of the MSCs, as per the proposal process. Functionally, clients and servers might need to change their behaviour slightly as is expected of implementing this stuff early. Synapse has these changes (alongside backwards compatibility) here: matrix-org/synapse#11667

* add changelogs

* Accuracy per review

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* fully prefix new endpoints

* Fully prefix endpoint in 3616 too

* Fix ordering example

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@turt2live
Copy link
Member

Merged 🎉

@turt2live turt2live added merged A proposal whose PR has merged into the spec! and removed spec-pr-in-review A proposal which has been PR'd against the spec and is in review labels Jan 17, 2022
babolivier added a commit to matrix-org/synapse-dinsic that referenced this pull request Apr 28, 2022
Synapse 1.57.0 (2022-04-19)
===========================

This version includes a [change](matrix-org/synapse#12209) to the way transaction IDs are managed for application services. If your deployment uses a dedicated worker for application service traffic, **it must be stopped** when the database is upgraded (which normally happens when the main process is upgraded), to ensure the change is made safely without any risk of reusing transaction IDs.

See the [upgrade notes](https://github.com/matrix-org/synapse/blob/v1.57.0rc1/docs/upgrade.md#upgrading-to-v1570) for more details.

No significant changes since 1.57.0rc1.

Synapse 1.57.0rc1 (2022-04-12)
==============================

Features
--------

- Send device list changes to application services as specified by [MSC3202](matrix-org/matrix-spec-proposals#3202), using unstable prefixes. The `msc3202_transaction_extensions` experimental homeserver config option must be enabled and `org.matrix.msc3202: true` must be present in the application service registration file for device list changes to be sent. The "left" field is currently always empty. ([\#11881](matrix-org/synapse#11881))
- Optimise fetching large quantities of missing room state over federation. ([\#12040](matrix-org/synapse#12040))
- Offload the `update_client_ip` background job from the main process to the background worker, when using Redis-based replication. ([\#12251](matrix-org/synapse#12251))
- Move `update_client_ip` background job from the main process to the background worker. ([\#12252](matrix-org/synapse#12252))
- Add a module callback to react to new 3PID (email address, phone number) associations. ([\#12302](matrix-org/synapse#12302))
- Add a configuration option to remove a specific set of rooms from sync responses. ([\#12310](matrix-org/synapse#12310))
- Add a module callback to react to account data changes. ([\#12327](matrix-org/synapse#12327))
- Allow setting user admin status using the module API. Contributed by Famedly. ([\#12341](matrix-org/synapse#12341))
- Reduce overhead of restarting synchrotrons. ([\#12367](matrix-org/synapse#12367), [\#12372](matrix-org/synapse#12372))
- Update `/messages` to use historic pagination tokens if no `from` query parameter is given. ([\#12370](matrix-org/synapse#12370))
- Add a module API for reading and writing global account data. ([\#12391](matrix-org/synapse#12391))
- Support the stable `v1` endpoint for `/relations`, per [MSC2675](matrix-org/matrix-spec-proposals#2675). ([\#12403](matrix-org/synapse#12403))
- Include bundled aggregations in search results
  ([MSC3666](matrix-org/matrix-spec-proposals#3666)). ([\#12436](matrix-org/synapse#12436))

Bugfixes
--------

- Fix a long-standing bug where updates to the server notices user profile (display name/avatar URL) in the configuration would not be applied to pre-existing rooms. Contributed by Jorge Florian. ([\#12115](matrix-org/synapse#12115))
- Fix a long-standing bug where events from ignored users were still considered for bundled aggregations. ([\#12235](matrix-org/synapse#12235), [\#12338](matrix-org/synapse#12338))
- Fix non-member state events not resolving for historical events when used in [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` `state_events_at_start`. ([\#12329](matrix-org/synapse#12329))
- Fix a long-standing bug affecting URL previews that would generate a 500 response instead of a 403 if the previewed URL includes a port that isn't allowed by the relevant blacklist. ([\#12333](matrix-org/synapse#12333))
- Default to `private` room visibility rather than `public` when a client does not specify one, according to spec. ([\#12350](matrix-org/synapse#12350))
- Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string. ([\#12364](matrix-org/synapse#12364), [\#12410](matrix-org/synapse#12410))
- Fix a bug introduced in Synapse 1.49.0 which caused the `synapse_event_persisted_position` metric to have invalid values. ([\#12390](matrix-org/synapse#12390))

Updates to the Docker image
---------------------------

- Bundle locked versions of dependencies into the Docker image. ([\#12385](matrix-org/synapse#12385), [\#12439](matrix-org/synapse#12439))
- Fix up healthcheck generation for workers docker image. ([\#12405](matrix-org/synapse#12405))

Improved Documentation
----------------------

- Clarify documentation for running SyTest against Synapse, including use of Postgres and worker mode. ([\#12271](matrix-org/synapse#12271))
- Document the behaviour of `LoggingTransaction.call_after` and `LoggingTransaction.call_on_exception` methods when transactions are retried. ([\#12315](matrix-org/synapse#12315))
- Update dead links in `check-newsfragment.sh` to point to the correct documentation URL. ([\#12331](matrix-org/synapse#12331))
- Upgrade the version of `mdbook` in CI to 0.4.17. ([\#12339](matrix-org/synapse#12339))
- Updates to the Room DAG concepts development document to clarify that we mark events as outliers because we don't have any state for them. ([\#12345](matrix-org/synapse#12345))
- Update the link to Redis pub/sub documentation in the workers documentation. ([\#12369](matrix-org/synapse#12369))
- Remove documentation for converting a legacy structured logging configuration to the new format. ([\#12392](matrix-org/synapse#12392))

Deprecations and Removals
-------------------------

- Remove the unused and unstable `/aggregations` endpoint which was removed from [MSC2675](matrix-org/matrix-spec-proposals#2675). ([\#12293](matrix-org/synapse#12293))

Internal Changes
----------------

- Remove lingering unstable references to MSC2403 (knocking). ([\#12165](matrix-org/synapse#12165))
- Avoid trying to calculate the state at outlier events. ([\#12191](matrix-org/synapse#12191), [\#12316](matrix-org/synapse#12316), [\#12330](matrix-org/synapse#12330), [\#12332](matrix-org/synapse#12332), [\#12409](matrix-org/synapse#12409))
- Omit sending "offline" presence updates to application services after they are initially configured. ([\#12193](matrix-org/synapse#12193))
- Switch to using a sequence to generate AS transaction IDs. Contributed by Nick @ Beeper. If running synapse with a dedicated appservice worker, this MUST be stopped before upgrading the main process and database. ([\#12209](matrix-org/synapse#12209))
- Add missing type hints for storage. ([\#12267](matrix-org/synapse#12267))
- Add missing type definitions for scripts in docker folder. Contributed by Jorge Florian. ([\#12280](matrix-org/synapse#12280))
- Move [MSC2654](matrix-org/matrix-spec-proposals#2654) support behind an experimental configuration flag. ([\#12295](matrix-org/synapse#12295))
- Update docstrings to explain how to decipher live and historic pagination tokens. ([\#12317](matrix-org/synapse#12317))
- Add ground work for speeding up device list updates for users in large numbers of rooms. ([\#12321](matrix-org/synapse#12321))
- Fix typechecker problems exposed by signedjson 1.1.2. ([\#12326](matrix-org/synapse#12326))
- Remove the `tox` packaging job: it will be redundant once #11537 lands. ([\#12334](matrix-org/synapse#12334))
- Ignore `.envrc` for `direnv` users. ([\#12335](matrix-org/synapse#12335))
- Remove the (broadly unused, dev-only) dockerfile for pg tests. ([\#12336](matrix-org/synapse#12336))
- Remove redundant `get_success` calls in test code. ([\#12346](matrix-org/synapse#12346))
- Add type annotations for `tests/unittest.py`. ([\#12347](matrix-org/synapse#12347))
- Move single-use methods out of `TestCase`. ([\#12348](matrix-org/synapse#12348))
- Remove broken and unused development scripts. ([\#12349](matrix-org/synapse#12349), [\#12351](matrix-org/synapse#12351), [\#12355](matrix-org/synapse#12355))
- Convert `Linearizer` tests from `inlineCallbacks` to async. ([\#12353](matrix-org/synapse#12353))
- Update docstrings for `ReadWriteLock` tests. ([\#12354](matrix-org/synapse#12354))
- Refactor `Linearizer`, convert methods to async and use an async context manager. ([\#12357](matrix-org/synapse#12357))
- Fix a long-standing bug where `Linearizer`s could get stuck if a cancellation were to happen at the wrong time. ([\#12358](matrix-org/synapse#12358))
- Make `StreamToken.from_string` and `RoomStreamToken.parse` propagate cancellations instead of replacing them with `SynapseError`s. ([\#12366](matrix-org/synapse#12366))
- Add type hints to tests files. ([\#12371](matrix-org/synapse#12371))
- Allow specifying the Postgres database's port when running unit tests with Postgres. ([\#12376](matrix-org/synapse#12376))
- Remove temporary pin of signedjson<=1.1.1 that was added in Synapse 1.56.0. ([\#12379](matrix-org/synapse#12379))
- Add opentracing spans to calls to external cache. ([\#12380](matrix-org/synapse#12380))
- Lay groundwork for using `poetry` to manage Synapse's dependencies. ([\#12381](matrix-org/synapse#12381), [\#12407](matrix-org/synapse#12407), [\#12412](matrix-org/synapse#12412), [\#12418](matrix-org/synapse#12418))
- Make missing `importlib_metadata` dependency explicit. ([\#12384](matrix-org/synapse#12384), [\#12400](matrix-org/synapse#12400))
- Update type annotations for compatiblity with prometheus_client 0.14. ([\#12389](matrix-org/synapse#12389))
- Remove support for the unstable identifiers specified in [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\#12398](matrix-org/synapse#12398))
- Add missing type hints to configuration classes. ([\#12402](matrix-org/synapse#12402))
- Add files used to build the Docker image used for complement testing into the Synapse repository. ([\#12404](matrix-org/synapse#12404))
- Do not include groups in the sync response when disabled. ([\#12408](matrix-org/synapse#12408))
- Improve type hints related to HTTP query parameters. ([\#12415](matrix-org/synapse#12415))
- Stop maintaining a list of lint targets. ([\#12420](matrix-org/synapse#12420))
- Make `synapse._scripts` pass type checks. ([\#12421](matrix-org/synapse#12421), [\#12422](matrix-org/synapse#12422))
- Add some type hints to datastore. ([\#12423](matrix-org/synapse#12423))
- Enable certificate checking during complement tests. ([\#12435](matrix-org/synapse#12435))
- Explicitly specify the `tls` extra for Twisted dependency. ([\#12444](matrix-org/synapse#12444))
PiotrKozimor added a commit to globekeeper/synapse that referenced this pull request May 5, 2022
Synapse 1.57.0 (2022-04-19)
===========================

This version includes a [change](matrix-org#12209) to the way transaction IDs are managed for application services. If your deployment uses a dedicated worker for application service traffic, **it must be stopped** when the database is upgraded (which normally happens when the main process is upgraded), to ensure the change is made safely without any risk of reusing transaction IDs.

See the [upgrade notes](https://github.com/matrix-org/synapse/blob/v1.57.0rc1/docs/upgrade.md#upgrading-to-v1570) for more details.

No significant changes since 1.57.0rc1.

Synapse 1.57.0rc1 (2022-04-12)
==============================

Features
--------

- Send device list changes to application services as specified by [MSC3202](matrix-org/matrix-spec-proposals#3202), using unstable prefixes. The `msc3202_transaction_extensions` experimental homeserver config option must be enabled and `org.matrix.msc3202: true` must be present in the application service registration file for device list changes to be sent. The "left" field is currently always empty. ([\matrix-org#11881](matrix-org#11881))
- Optimise fetching large quantities of missing room state over federation. ([\matrix-org#12040](matrix-org#12040))
- Offload the `update_client_ip` background job from the main process to the background worker, when using Redis-based replication. ([\matrix-org#12251](matrix-org#12251))
- Move `update_client_ip` background job from the main process to the background worker. ([\matrix-org#12252](matrix-org#12252))
- Add a module callback to react to new 3PID (email address, phone number) associations. ([\matrix-org#12302](matrix-org#12302))
- Add a configuration option to remove a specific set of rooms from sync responses. ([\matrix-org#12310](matrix-org#12310))
- Add a module callback to react to account data changes. ([\matrix-org#12327](matrix-org#12327))
- Allow setting user admin status using the module API. Contributed by Famedly. ([\matrix-org#12341](matrix-org#12341))
- Reduce overhead of restarting synchrotrons. ([\matrix-org#12367](matrix-org#12367), [\matrix-org#12372](matrix-org#12372))
- Update `/messages` to use historic pagination tokens if no `from` query parameter is given. ([\matrix-org#12370](matrix-org#12370))
- Add a module API for reading and writing global account data. ([\matrix-org#12391](matrix-org#12391))
- Support the stable `v1` endpoint for `/relations`, per [MSC2675](matrix-org/matrix-spec-proposals#2675). ([\matrix-org#12403](matrix-org#12403))
- Include bundled aggregations in search results
  ([MSC3666](matrix-org/matrix-spec-proposals#3666)). ([\matrix-org#12436](matrix-org#12436))

Bugfixes
--------

- Fix a long-standing bug where updates to the server notices user profile (display name/avatar URL) in the configuration would not be applied to pre-existing rooms. Contributed by Jorge Florian. ([\matrix-org#12115](matrix-org#12115))
- Fix a long-standing bug where events from ignored users were still considered for bundled aggregations. ([\matrix-org#12235](matrix-org#12235), [\matrix-org#12338](matrix-org#12338))
- Fix non-member state events not resolving for historical events when used in [MSC2716](matrix-org/matrix-spec-proposals#2716) `/batch_send` `state_events_at_start`. ([\matrix-org#12329](matrix-org#12329))
- Fix a long-standing bug affecting URL previews that would generate a 500 response instead of a 403 if the previewed URL includes a port that isn't allowed by the relevant blacklist. ([\matrix-org#12333](matrix-org#12333))
- Default to `private` room visibility rather than `public` when a client does not specify one, according to spec. ([\matrix-org#12350](matrix-org#12350))
- Fix a spec compliance issue where requests to the `/publicRooms` federation API would specify `limit` as a string. ([\matrix-org#12364](matrix-org#12364), [\matrix-org#12410](matrix-org#12410))
- Fix a bug introduced in Synapse 1.49.0 which caused the `synapse_event_persisted_position` metric to have invalid values. ([\matrix-org#12390](matrix-org#12390))

Updates to the Docker image
---------------------------

- Bundle locked versions of dependencies into the Docker image. ([\matrix-org#12385](matrix-org#12385), [\matrix-org#12439](matrix-org#12439))
- Fix up healthcheck generation for workers docker image. ([\matrix-org#12405](matrix-org#12405))

Improved Documentation
----------------------

- Clarify documentation for running SyTest against Synapse, including use of Postgres and worker mode. ([\matrix-org#12271](matrix-org#12271))
- Document the behaviour of `LoggingTransaction.call_after` and `LoggingTransaction.call_on_exception` methods when transactions are retried. ([\matrix-org#12315](matrix-org#12315))
- Update dead links in `check-newsfragment.sh` to point to the correct documentation URL. ([\matrix-org#12331](matrix-org#12331))
- Upgrade the version of `mdbook` in CI to 0.4.17. ([\matrix-org#12339](matrix-org#12339))
- Updates to the Room DAG concepts development document to clarify that we mark events as outliers because we don't have any state for them. ([\matrix-org#12345](matrix-org#12345))
- Update the link to Redis pub/sub documentation in the workers documentation. ([\matrix-org#12369](matrix-org#12369))
- Remove documentation for converting a legacy structured logging configuration to the new format. ([\matrix-org#12392](matrix-org#12392))

Deprecations and Removals
-------------------------

- Remove the unused and unstable `/aggregations` endpoint which was removed from [MSC2675](matrix-org/matrix-spec-proposals#2675). ([\matrix-org#12293](matrix-org#12293))

Internal Changes
----------------

- Remove lingering unstable references to MSC2403 (knocking). ([\matrix-org#12165](matrix-org#12165))
- Avoid trying to calculate the state at outlier events. ([\matrix-org#12191](matrix-org#12191), [\matrix-org#12316](matrix-org#12316), [\matrix-org#12330](matrix-org#12330), [\matrix-org#12332](matrix-org#12332), [\matrix-org#12409](matrix-org#12409))
- Omit sending "offline" presence updates to application services after they are initially configured. ([\matrix-org#12193](matrix-org#12193))
- Switch to using a sequence to generate AS transaction IDs. Contributed by Nick @ Beeper. If running synapse with a dedicated appservice worker, this MUST be stopped before upgrading the main process and database. ([\matrix-org#12209](matrix-org#12209))
- Add missing type hints for storage. ([\matrix-org#12267](matrix-org#12267))
- Add missing type definitions for scripts in docker folder. Contributed by Jorge Florian. ([\matrix-org#12280](matrix-org#12280))
- Move [MSC2654](matrix-org/matrix-spec-proposals#2654) support behind an experimental configuration flag. ([\matrix-org#12295](matrix-org#12295))
- Update docstrings to explain how to decipher live and historic pagination tokens. ([\matrix-org#12317](matrix-org#12317))
- Add ground work for speeding up device list updates for users in large numbers of rooms. ([\matrix-org#12321](matrix-org#12321))
- Fix typechecker problems exposed by signedjson 1.1.2. ([\matrix-org#12326](matrix-org#12326))
- Remove the `tox` packaging job: it will be redundant once matrix-org#11537 lands. ([\matrix-org#12334](matrix-org#12334))
- Ignore `.envrc` for `direnv` users. ([\matrix-org#12335](matrix-org#12335))
- Remove the (broadly unused, dev-only) dockerfile for pg tests. ([\matrix-org#12336](matrix-org#12336))
- Remove redundant `get_success` calls in test code. ([\matrix-org#12346](matrix-org#12346))
- Add type annotations for `tests/unittest.py`. ([\matrix-org#12347](matrix-org#12347))
- Move single-use methods out of `TestCase`. ([\matrix-org#12348](matrix-org#12348))
- Remove broken and unused development scripts. ([\matrix-org#12349](matrix-org#12349), [\matrix-org#12351](matrix-org#12351), [\matrix-org#12355](matrix-org#12355))
- Convert `Linearizer` tests from `inlineCallbacks` to async. ([\matrix-org#12353](matrix-org#12353))
- Update docstrings for `ReadWriteLock` tests. ([\matrix-org#12354](matrix-org#12354))
- Refactor `Linearizer`, convert methods to async and use an async context manager. ([\matrix-org#12357](matrix-org#12357))
- Fix a long-standing bug where `Linearizer`s could get stuck if a cancellation were to happen at the wrong time. ([\matrix-org#12358](matrix-org#12358))
- Make `StreamToken.from_string` and `RoomStreamToken.parse` propagate cancellations instead of replacing them with `SynapseError`s. ([\matrix-org#12366](matrix-org#12366))
- Add type hints to tests files. ([\matrix-org#12371](matrix-org#12371))
- Allow specifying the Postgres database's port when running unit tests with Postgres. ([\matrix-org#12376](matrix-org#12376))
- Remove temporary pin of signedjson<=1.1.1 that was added in Synapse 1.56.0. ([\matrix-org#12379](matrix-org#12379))
- Add opentracing spans to calls to external cache. ([\matrix-org#12380](matrix-org#12380))
- Lay groundwork for using `poetry` to manage Synapse's dependencies. ([\matrix-org#12381](matrix-org#12381), [\matrix-org#12407](matrix-org#12407), [\matrix-org#12412](matrix-org#12412), [\matrix-org#12418](matrix-org#12418))
- Make missing `importlib_metadata` dependency explicit. ([\matrix-org#12384](matrix-org#12384), [\matrix-org#12400](matrix-org#12400))
- Update type annotations for compatiblity with prometheus_client 0.14. ([\matrix-org#12389](matrix-org#12389))
- Remove support for the unstable identifiers specified in [MSC3288](matrix-org/matrix-spec-proposals#3288). ([\matrix-org#12398](matrix-org#12398))
- Add missing type hints to configuration classes. ([\matrix-org#12402](matrix-org#12402))
- Add files used to build the Docker image used for complement testing into the Synapse repository. ([\matrix-org#12404](matrix-org#12404))
- Do not include groups in the sync response when disabled. ([\matrix-org#12408](matrix-org#12408))
- Improve type hints related to HTTP query parameters. ([\matrix-org#12415](matrix-org#12415))
- Stop maintaining a list of lint targets. ([\matrix-org#12420](matrix-org#12420))
- Make `synapse._scripts` pass type checks. ([\matrix-org#12421](matrix-org#12421), [\matrix-org#12422](matrix-org#12422))
- Add some type hints to datastore. ([\matrix-org#12423](matrix-org#12423))
- Enable certificate checking during complement tests. ([\matrix-org#12435](matrix-org#12435))
- Explicitly specify the `tls` extra for Twisted dependency. ([\matrix-org#12444](matrix-org#12444))
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 18, 2023
chat/matrix-synapse: security update

Revisions pulled up:
- chat/matrix-synapse/Makefile                                  1.34-1.36
- chat/matrix-synapse/PLIST                                     1.18-1.19
- chat/matrix-synapse/distinfo                                  1.24,1.27-1.28

-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   js
   Date:           Sat Oct  2 12:23:13 UTC 2021

   Modified Files:
           pkgsrc/chat/matrix-synapse: Makefile PLIST distinfo

   Log Message:
   Update chat/matrix-synapse to 1.43.0

   Synapse 1.43.0 (2021-09-21)
   =============
   This release drops support for the deprecated, unstable API for [MSC2858 (Multiple SSO Identity
   Providers)](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix), as well as the undocumented `experimental.msc2858_enabled` config
   option. Client authors should update their clients to use the stable API, available since Synapse 1.30.

   The documentation has been updated with configuration for routing `/spaces`, `/hierarchy` and `/summary` to workers. See [the upgrade
   notes](https://github.com/matrix-org/synapse/blob/release-v1.43/docs/upgrade.md#upgrading-to-v1430) for more details.

   No significant changes since 1.43.0rc2.

   Synapse 1.43.0rc2 (2021-09-17)
   ===============

   Bugfixes
   --------

   - Added opentracing logging to help debug [\#9424](https://github.com/matrix-org/synapse/issues/9424). ([\#10828](https://github.com/matrix-org/synapse/issues/10828))

   Synapse 1.43.0rc1 (2021-09-14)
   ===============

   Features
   --------

   - Allow room creators to send historical events specified by [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) in existing room versions.
   ([\#10566](https://github.com/matrix-org/synapse/issues/10566))
   - Add config option to use non-default manhole password and keys. ([\#10643](https://github.com/matrix-org/synapse/issues/10643))
   - Skip final GC at shutdown to improve restart performance. ([\#10712](https://github.com/matrix-org/synapse/issues/10712))
   - Allow configuration of the oEmbed URLs used for URL previews. ([\#10714](https://github.com/matrix-org/synapse/issues/10714), [\#10759](https://github.com/matrix-org/synapse/issues/10759))
   - Prefer [room version 9](https://github.com/matrix-org/matrix-doc/pull/3375) for restricted rooms per the [room version capabilities](https://github.com/matrix-org/matrix-doc/pull/3244) API.
   ([\#10772](https://github.com/matrix-org/synapse/issues/10772))

   Bugfixes
   --------

   - Fix a long-standing bug where room avatars were not included in email notifications. ([\#10658](https://github.com/matrix-org/synapse/issues/10658))
   - Fix a bug where the ordering algorithm was skipping the `origin_server_ts` step in the spaces summary resulting in unstable room orderings.
   ([\#10730](https://github.com/matrix-org/synapse/issues/10730))
   - Fix edge case when persisting events into a room where there are multiple events we previously hadn't calculated auth chains for (and hadn't marked as needing to be calculated).
   ([\#10743](https://github.com/matrix-org/synapse/issues/10743))
   - Fix a bug which prevented calls to `/createRoom` that included the `room_alias_name` parameter from being handled by worker processes. ([\#10757](https://github.com/matrix-org/synapse/issues/10757))
   - Fix a bug which prevented user registration via SSO to require consent tracking for SSO mapping providers that don't prompt for Matrix ID selection. Contributed by @AndrewFerr.
   ([\#10733](https://github.com/matrix-org/synapse/issues/10733))
   - Only return the stripped state events for the `m.space.child` events in a room for the spaces summary from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946).
   ([\#10760](https://github.com/matrix-org/synapse/issues/10760))
   - Properly handle room upgrades of spaces. ([\#10774](https://github.com/matrix-org/synapse/issues/10774))
   - Fix a bug which generated invalid homeserver config when the `frontend_proxy` worker type was passed to the Synapse Worker-based Complement image.
   ([\#10783](https://github.com/matrix-org/synapse/issues/10783))

   Improved Documentation
   ----------------------

   - Minor fix to the `media_repository` developer documentation. Contributed by @cuttingedge1109. ([\#10556](https://github.com/matrix-org/synapse/issues/10556))
   - Update the documentation to note that the `/spaces` and `/hierarchy` endpoints can be routed to workers. ([\#10648](https://github.com/matrix-org/synapse/issues/10648))
   - Clarify admin API documentation on undoing room deletions. ([\#10735](https://github.com/matrix-org/synapse/issues/10735))
   - Split up the modules documentation and add examples for module developers. ([\#10758](https://github.com/matrix-org/synapse/issues/10758))
   - Correct 2 typographical errors in the [Log Contexts documentation](https://matrix-org.github.io/synapse/latest/log_contexts.html). ([\#10795](https://github.com/matrix-org/synapse/issues/10795))
   - Fix a wording mistake in the sample configuration. Contributed by @bramvdnheuvel:nltrix.net. ([\#10804](https://github.com/matrix-org/synapse/issues/10804))

   Deprecations and Removals
   -------------------------

   - Remove the [unstable MSC2858 API](https://github.com/matrix-org/matrix-doc/blob/master/proposals/2858-Multiple-SSO-Identity-Providers.md#unstable-prefix), including the undocumented
   `experimental.msc2858_enabled` config option. The unstable API has been deprecated since Synapse 1.35. Client authors should update their clients to use the stable API introduced in Synapse 1.30 if
   they have not already done so. ([\#10693](https://github.com/matrix-org/synapse/issues/10693))

   Internal Changes
   ----------------

   - Add OpenTracing logging to help debug stuck messages (as described by issue [#9424](https://github.com/matrix-org/synapse/issues/9424)).
   ([\#10704](https://github.com/matrix-org/synapse/issues/10704))
   - Add type annotations to the `synapse.util` package. ([\#10601](https://github.com/matrix-org/synapse/issues/10601))
   - Ensure `rooms.creator` field is always populated for easy lookup in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) usage later.
   ([\#10697](https://github.com/matrix-org/synapse/issues/10697))
   - Add missing type hints to REST servlets. ([\#10707](https://github.com/matrix-org/synapse/issues/10707), [\#10728](https://github.com/matrix-org/synapse/issues/10728),
   [\#10736](https://github.com/matrix-org/synapse/issues/10736))
   - Do not include rooms with unknown room versions in the spaces summary results. ([\#10727](https://github.com/matrix-org/synapse/issues/10727))
   - Additional error checking for the `preset` field when creating a room. ([\#10738](https://github.com/matrix-org/synapse/issues/10738))
   - Clean up some of the federation event authentication code for clarity. ([\#10744](https://github.com/matrix-org/synapse/issues/10744), [\#10745](https://github.com/matrix-org/synapse/issues/10745),
   [\#10746](https://github.com/matrix-org/synapse/issues/10746), [\#10771](https://github.com/matrix-org/synapse/issues/10771), [\#10773](https://github.com/matrix-org/synapse/issues/10773),
   [\#10781](https://github.com/matrix-org/synapse/issues/10781))
   - Add an index to `presence_stream` to hopefully speed up startups a little. ([\#10748](https://github.com/matrix-org/synapse/issues/10748))
   - Refactor event size checking code to simplify searching the codebase for the origins of certain error strings that are occasionally emitted.
   ([\#10750](https://github.com/matrix-org/synapse/issues/10750))
   - Move tests relating to rooms having encryption out of the user directory tests. ([\#10752](https://github.com/matrix-org/synapse/issues/10752))
   - Use `attrs` internally for the URL preview code & update documentation. ([\#10753](https://github.com/matrix-org/synapse/issues/10753))
   - Minor speed ups when joining large rooms over federation. ([\#10754](https://github.com/matrix-org/synapse/issues/10754), [\#10755](https://github.com/matrix-org/synapse/issues/10755),
   [\#10756](https://github.com/matrix-org/synapse/issues/10756), [\#10780](https://github.com/matrix-org/synapse/issues/10780), [\#10784](https://github.com/matrix-org/synapse/issues/10784))
   - Add a constant for `m.federate`. ([\#10775](https://github.com/matrix-org/synapse/issues/10775))
   - Add a script to update the Debian changelog in a Docker container for systems that are not Debian-based. ([\#10778](https://github.com/matrix-org/synapse/issues/10778))
   - Change the format of authenticated users in logs when a user is being puppeted by and admin user. ([\#10779](https://github.com/matrix-org/synapse/issues/10779))
   - Remove fixed and flakey tests from the Sytest blacklist. ([\#10788](https://github.com/matrix-org/synapse/issues/10788))
   - Improve internal details of the user directory code. ([\#10789](https://github.com/matrix-org/synapse/issues/10789))
   - Use direct references to config flags. ([\#10798](https://github.com/matrix-org/synapse/issues/10798))
   - Ensure the Rust reporter passes type checking with jaeger-client 4.7's type annotations. ([\#10799](https://github.com/matrix-org/synapse/issues/10799))

   Synapse 1.42.0 (2021-09-07)
   =============
   This version of Synapse removes deprecated room-management admin APIs, removes out-of-date email pushers, and improves error handling for fallback templates for user-interactive authentication. For
   more information on these points, server administrators are encouraged to read [the upgrade notes](docs/upgrade.md#upgrading-to-v1420).

   No significant changes since 1.42.0rc2.

   Synapse 1.42.0rc2 (2021-09-06)
   ===============

   Features
   --------

   - Support room version 9 from [MSC3375](https://github.com/matrix-org/matrix-doc/pull/3375). ([\#10747](https://github.com/matrix-org/synapse/issues/10747))

   Internal Changes
   ----------------

   - Print a warning when using one of the deprecated `template_dir` settings. ([\#10768](https://github.com/matrix-org/synapse/issues/10768))

   Synapse 1.42.0rc1 (2021-09-01)
   ===============

   Features
   --------

   - Add support for [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231): Token authenticated registration. Users can be required to submit a token during registration to authenticate
   themselves. Contributed by Callum Brown. ([\#10142](https://github.com/matrix-org/synapse/issues/10142))
   - Add support for [MSC3283](https://github.com/matrix-org/matrix-doc/pull/3283): Expose `enable_set_displayname` in capabilities. ([\#10452](https://github.com/matrix-org/synapse/issues/10452))
   - Port the `PresenceRouter` module interface to the new generic interface. ([\#10524](https://github.com/matrix-org/synapse/issues/10524))
   - Add pagination to the spaces summary based on updates to [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946). ([\#10613](https://github.com/matrix-org/synapse/issues/10613),
   [\#10725](https://github.com/matrix-org/synapse/issues/10725))

   Bugfixes
   --------

   - Validate new `m.room.power_levels` events. Contributed by @aaronraimist. ([\#10232](https://github.com/matrix-org/synapse/issues/10232))
   - Display an error on User-Interactive Authentication fallback pages when authentication fails. Contributed by Callum Brown. ([\#10561](https://github.com/matrix-org/synapse/issues/10561))
   - Remove pushers when deleting an e-mail address from an account. Pushers for old unlinked emails will also be deleted. ([\#10581](https://github.com/matrix-org/synapse/issues/10581),
   [\#10734](https://github.com/matrix-org/synapse/issues/10734))
   - Reject Client-Server `/keys/query` requests which provide `device_ids` incorrectly. ([\#10593](https://github.com/matrix-org/synapse/issues/10593))
   - Rooms with unsupported room versions are no longer returned via `/sync`. ([\#10644](https://github.com/matrix-org/synapse/issues/10644))
   - Enforce the maximum length for per-room display names and avatar URLs. ([\#10654](https://github.com/matrix-org/synapse/issues/10654))
   - Fix a bug which caused the `synapse_user_logins_total` Prometheus metric not to be correctly initialised on restart. ([\#10677](https://github.com/matrix-org/synapse/issues/10677))
   - Improve `ServerNoticeServlet` to avoid duplicate requests and add unit tests. ([\#10679](https://github.com/matrix-org/synapse/issues/10679))
   - Fix long-standing issue which caused an error when a thumbnail is requested and there are multiple thumbnails with the same quality rating.
   ([\#10684](https://github.com/matrix-org/synapse/issues/10684))
   - Fix a regression introduced in v1.41.0 which affected the performance of concurrent fetches of large sets of events, in extreme cases causing the process to hang.
   ([\#10703](https://github.com/matrix-org/synapse/issues/10703))
   - Fix a regression introduced in Synapse 1.41 which broke email transmission on Systems using older versions of the Twisted library. ([\#10713](https://github.com/matrix-org/synapse/issues/10713))

   Improved Documentation
   ----------------------

   - Add documentation on how to connect Django with Synapse using OpenID Connect and django-oauth-toolkit. Contributed by @HugoDelval. ([\#10192](https://github.com/matrix-org/synapse/issues/10192))
   - Advertise https://matrix-org.github.io/synapse documentation in the `README` and `CONTRIBUTING` files. ([\#10595](https://github.com/matrix-org/synapse/issues/10595))
   - Fix some of the titles not rendering in the OpenID Connect documentation. ([\#10639](https://github.com/matrix-org/synapse/issues/10639))
   - Minor clarifications to the documentation for reverse proxies. ([\#10708](https://github.com/matrix-org/synapse/issues/10708))
   - Remove table of contents from the top of installation and contributing documentation pages. ([\#10711](https://github.com/matrix-org/synapse/issues/10711))

   Deprecations and Removals
   -------------------------

   - Remove deprecated Shutdown Room and Purge Room Admin API. ([\#8830](https://github.com/matrix-org/synapse/issues/8830))

   Internal Changes
   ----------------

   - Improve type hints for the proxy agent and SRV resolver modules. Contributed by @dklimpel. ([\#10608](https://github.com/matrix-org/synapse/issues/10608))
   - Clean up some of the federation event authentication code for clarity. ([\#10614](https://github.com/matrix-org/synapse/issues/10614), [\#10615](https://github.com/matrix-org/synapse/issues/10615),
   [\#10624](https://github.com/matrix-org/synapse/issues/10624), [\#10640](https://github.com/matrix-org/synapse/issues/10640))
   - Add a comment asking developers to leave a reason when bumping the database schema version. ([\#10621](https://github.com/matrix-org/synapse/issues/10621))
   - Remove not needed database updates in modify user admin API. ([\#10627](https://github.com/matrix-org/synapse/issues/10627))
   - Convert room member storage tuples to `attrs` classes. ([\#10629](https://github.com/matrix-org/synapse/issues/10629), [\#10642](https://github.com/matrix-org/synapse/issues/10642))
   - Use auto-attribs for the attrs classes used in sync. ([\#10630](https://github.com/matrix-org/synapse/issues/10630))
   - Make `backfill` and `get_missing_events` use the same codepath. ([\#10645](https://github.com/matrix-org/synapse/issues/10645))
   - Improve the performance of the `/hierarchy` API (from [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946)) by caching responses received over federation.
   ([\#10647](https://github.com/matrix-org/synapse/issues/10647))
   - Run a nightly CI build against Twisted trunk. ([\#10651](https://github.com/matrix-org/synapse/issues/10651), [\#10672](https://github.com/matrix-org/synapse/issues/10672))
   - Do not print out stack traces for network errors when fetching data over federation. ([\#10662](https://github.com/matrix-org/synapse/issues/10662))
   - Simplify tests for device admin rest API. ([\#10664](https://github.com/matrix-org/synapse/issues/10664))
   - Add missing type hints to REST servlets. ([\#10665](https://github.com/matrix-org/synapse/issues/10665), [\#10666](https://github.com/matrix-org/synapse/issues/10666),
   [\#10674](https://github.com/matrix-org/synapse/issues/10674))
   - Flatten the `tests.synapse.rests` package by moving the contents of `v1` and `v2_alpha` into the parent. ([\#10667](https://github.com/matrix-org/synapse/issues/10667))
   - Update `complement.sh` to rebuild the base Docker image when run with workers. ([\#10686](https://github.com/matrix-org/synapse/issues/10686))
   - Split the event-processing methods in `FederationHandler` into a separate `FederationEventHandler`. ([\#10692](https://github.com/matrix-org/synapse/issues/10692))
   - Remove unused `compare_digest` function. ([\#10706](https://github.com/matrix-org/synapse/issues/10706))


   To generate a diff of this commit:
   cvs rdiff -u -r1.33 -r1.34 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.17 -r1.18 pkgsrc/chat/matrix-synapse/PLIST
   cvs rdiff -u -r1.23 -r1.24 pkgsrc/chat/matrix-synapse/distinfo

-------------------------------------------------------------------
   Module Name:    pkgsrc
   Committed By:   js
   Date:           Fri Nov 19 14:06:08 UTC 2021

   Modified Files:
           pkgsrc/chat/matrix-synapse: Makefile PLIST distinfo

   Log Message:
   Update chat/matrix-synapse to 1.47.0

   Synapse 1.47.0 (2021-11-17)
   =============
   No significant changes since 1.47.0rc3.

   Synapse 1.47.0rc3 (2021-11-16)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in 1.47.0rc1 which caused worker processes to not halt startup in the presence of outstanding database migrations.
   ([\#11346](https://github.com/matrix-org/synapse/issues/11346))
   - Fix a bug introduced in 1.47.0rc1 which prevented the 'remove deleted devices from `device_inbox` column' background process from running when updating from a recent Synapse version.
   ([\#11303](https://github.com/matrix-org/synapse/issues/11303), [\#11353](https://github.com/matrix-org/synapse/issues/11353))

   Synapse 1.47.0rc2 (2021-11-10)
   ===============

   This fixes an issue with publishing the Debian packages for 1.47.0rc1.
   It is otherwise identical to 1.47.0rc1.

   Synapse 1.47.0rc1 (2021-11-09)
   ===============

   Deprecations and Removals
   -------------------------

   - The `user_may_create_room_with_invites` module callback is now deprecated. Please refer to the [upgrade notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1470) for more
   information. ([\#11206](https://github.com/matrix-org/synapse/issues/11206))
   - Remove deprecated admin API to delete rooms (`POST /_synapse/admin/v1/rooms/<room_id>/delete`). ([\#11213](https://github.com/matrix-org/synapse/issues/11213))

   Features
   --------

   - Advertise support for Client-Server API r0.6.1. ([\#11097](https://github.com/matrix-org/synapse/issues/11097))
   - Add search by room ID and room alias to the List Room admin API. ([\#11099](https://github.com/matrix-org/synapse/issues/11099))
   - Add an `on_new_event` third-party rules callback to allow Synapse modules to act after an event has been sent into a room. ([\#11126](https://github.com/matrix-org/synapse/issues/11126))
   - Add a module API method to update a user's membership in a room. ([\#11147](https://github.com/matrix-org/synapse/issues/11147))
   - Add metrics for thread pool usage. ([\#11178](https://github.com/matrix-org/synapse/issues/11178))
   - Support the stable room type field for [MSC3288](https://github.com/matrix-org/matrix-doc/pull/3288). ([\#11187](https://github.com/matrix-org/synapse/issues/11187))
   - Add a module API method to retrieve the current state of a room. ([\#11204](https://github.com/matrix-org/synapse/issues/11204))
   - Calculate a default value for `public_baseurl` based on `server_name`. ([\#11210](https://github.com/matrix-org/synapse/issues/11210))
   - Add support for serving `/.well-known/matrix/server` files, to redirect federation traffic to port 443. ([\#11211](https://github.com/matrix-org/synapse/issues/11211))
   - Add admin APIs to pause, start and check the status of background updates. ([\#11263](https://github.com/matrix-org/synapse/issues/11263))

   Bugfixes
   --------

   - Fix a long-standing bug which allowed hidden devices to receive to-device messages, resulting in unnecessary database bloat. ([\#10097](https://github.com/matrix-org/synapse/issues/10097))
   - Fix a long-standing bug where messages in the `device_inbox` table for deleted devices would persist indefinitely. Contributed by @dklimpel and @JohannesKleine.
   ([\#10969](https://github.com/matrix-org/synapse/issues/10969), [\#11212](https://github.com/matrix-org/synapse/issues/11212))
   - Do not accept events if a third-party rule `check_event_allowed` callback raises an exception. ([\#11033](https://github.com/matrix-org/synapse/issues/11033))
   - Fix long-standing bug where verification requests could fail in certain cases if a federation whitelist was in place but did not include your own homeserver.
   ([\#11129](https://github.com/matrix-org/synapse/issues/11129))
   - Allow an empty list of `state_events_at_start` to be sent when using the [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint and the author of the historical
   messages is already part of the current room state at the given `?prev_event_id`. ([\#11188](https://github.com/matrix-org/synapse/issues/11188))
   - Fix a bug introduced in Synapse 1.45.0 which prevented the `synapse_review_recent_signups` script from running. Contributed by @samuel-p.
   ([\#11191](https://github.com/matrix-org/synapse/issues/11191))
   - Delete `to_device` messages for hidden devices that will never be read, reducing database size. ([\#11199](https://github.com/matrix-org/synapse/issues/11199))
   - Fix a long-standing bug wherein a missing `Content-Type` header when downloading remote media would cause Synapse to throw an error. ([\#11200](https://github.com/matrix-org/synapse/issues/11200))
   - Fix a long-standing bug which could result in serialization errors and potentially duplicate transaction data when sending ephemeral events to application services. Contributed by @Fizzadar at
   Beeper. ([\#11207](https://github.com/matrix-org/synapse/issues/11207))
   - Fix a bug introduced in Synapse 1.35.0 which made it impossible to join rooms that return a `send_join` response containing floats. ([\#11217](https://github.com/matrix-org/synapse/issues/11217))
   - Fix long-standing bug where cross signing keys were not included in the response to `/r0/keys/query` the first time a remote user was queried.
   ([\#11234](https://github.com/matrix-org/synapse/issues/11234))
   - Fix a long-standing bug where all requests that read events from the database could get stuck as a result of losing the database connection.
   ([\#11240](https://github.com/matrix-org/synapse/issues/11240))
   - Fix a bug preventing Synapse from being rolled back to an earlier version when using workers. ([\#11255](https://github.com/matrix-org/synapse/issues/11255),
   [\#11276](https://github.com/matrix-org/synapse/issues/11276))
   - Fix a bug introduced in Synapse 1.37.1 which caused a remote event being processed by a worker to not get processed on restart if the worker was killed.
   ([\#11262](https://github.com/matrix-org/synapse/issues/11262))
   - Only allow old Element/Riot Android clients to send read receipts without a request body. All other clients must include a request body as required by the specification. Contributed by @rogersheu.
   ([\#11157](https://github.com/matrix-org/synapse/issues/11157))

   Updates to the Docker image
   ---------------------------

   - Avoid changing user ID when started as a non-root user, and no explicit `UID` is set. ([\#11209](https://github.com/matrix-org/synapse/issues/11209))

   Improved Documentation
   ----------------------

   - Improve example HAProxy config in the docs to properly handle HTTP `Host` headers with port information. This is required for federation over port 443 to work correctly.
   ([\#11128](https://github.com/matrix-org/synapse/issues/11128))
   - Add documentation for using Authentik as an OpenID Connect Identity Provider. Contributed by @samip5. ([\#11151](https://github.com/matrix-org/synapse/issues/11151))
   - Clarify lack of support for Windows. ([\#11198](https://github.com/matrix-org/synapse/issues/11198))
   - Improve code formatting and fix a few typos in docs. Contributed by @sumnerevans at Beeper. ([\#11221](https://github.com/matrix-org/synapse/issues/11221))
   - Add documentation for using LemonLDAP as an OpenID Connect Identity Provider. Contributed by @l00ptr. ([\#11257](https://github.com/matrix-org/synapse/issues/11257))

   Internal Changes
   ----------------

   - Add type annotations for the `log_function` decorator. ([\#10943](https://github.com/matrix-org/synapse/issues/10943))
   - Add type hints to `synapse.events`. ([\#11098](https://github.com/matrix-org/synapse/issues/11098))
   - Remove and document unnecessary `RoomStreamToken` checks in application service ephemeral event code. ([\#11137](https://github.com/matrix-org/synapse/issues/11137))
   - Add type hints so that `synapse.http` passes `mypy` checks. ([\#11164](https://github.com/matrix-org/synapse/issues/11164))
   - Update scripts to pass Shellcheck lints. ([\#11166](https://github.com/matrix-org/synapse/issues/11166))
   - Add knock information in admin export. Contributed by Rafael Gonçalves. ([\#11171](https://github.com/matrix-org/synapse/issues/11171))
   - Add tests to check that `ClientIpStore.get_last_client_ip_by_device` and `get_user_ip_and_agents` combine database and in-memory data correctly.
   ([\#11179](https://github.com/matrix-org/synapse/issues/11179))
   - Refactor `Filter` to check different fields depending on the data type. ([\#11194](https://github.com/matrix-org/synapse/issues/11194))
   - Improve type hints for the relations datastore. ([\#11205](https://github.com/matrix-org/synapse/issues/11205))
   - Replace outdated links in the pull request checklist with links to the rendered documentation. ([\#11225](https://github.com/matrix-org/synapse/issues/11225))
   - Fix a bug in unit test `test_block_room_and_not_purge`. ([\#11226](https://github.com/matrix-org/synapse/issues/11226))
   - In `ObservableDeferred`, run observers in the order they were registered. ([\#11229](https://github.com/matrix-org/synapse/issues/11229))
   - Minor speed up to start up times and getting updates for groups by adding missing index to `local_group_updates.stream_id`. ([\#11231](https://github.com/matrix-org/synapse/issues/11231))
   - Add `twine` and `towncrier` as dev dependencies, as they're used by the release script. ([\#11233](https://github.com/matrix-org/synapse/issues/11233))
   - Allow `stream_writers.typing` config to be a list of one worker. ([\#11237](https://github.com/matrix-org/synapse/issues/11237))
   - Remove debugging statement in tests. ([\#11239](https://github.com/matrix-org/synapse/issues/11239))
   - Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical messages backfilling in random order on remote homeservers.
   ([\#11244](https://github.com/matrix-org/synapse/issues/11244))
   - Add an additional test for the `cachedList` method decorator. ([\#11246](https://github.com/matrix-org/synapse/issues/11246))
   - Make minor correction to the type of `auth_checkers` callbacks. ([\#11253](https://github.com/matrix-org/synapse/issues/11253))
   - Clean up trivial aspects of the Debian package build tooling. ([\#11269](https://github.com/matrix-org/synapse/issues/11269), [\#11273](https://github.com/matrix-org/synapse/issues/11273))
   - Blacklist new SyTest that checks that key uploads are valid pending the validation being implemented in Synapse. ([\#11270](https://github.com/matrix-org/synapse/issues/11270))

   Synapse 1.46.0 (2021-11-02)
   =============
   The cause of the [performance regression affecting Synapse 1.44](https://github.com/matrix-org/synapse/issues/11049) has been identified and fixed.
   ([\#11177](https://github.com/matrix-org/synapse/issues/11177))

   Bugfixes
   --------

   - Fix a bug introduced in v1.46.0rc1 where URL previews of some XML documents would fail. ([\#11196](https://github.com/matrix-org/synapse/issues/11196))

   Synapse 1.46.0rc1 (2021-10-27)
   ===============

   Features
   --------

   - Add support for Ubuntu 21.10 "Impish Indri". ([\#11024](https://github.com/matrix-org/synapse/issues/11024))
   - Port the Password Auth Providers module interface to the new generic interface. ([\#10548](https://github.com/matrix-org/synapse/issues/10548),
   [\#11180](https://github.com/matrix-org/synapse/issues/11180))
   - Experimental support for the thread relation defined in [MSC3440](https://github.com/matrix-org/matrix-doc/pull/3440). ([\#11088](https://github.com/matrix-org/synapse/issues/11088),
   [\#11181](https://github.com/matrix-org/synapse/issues/11181), [\#11192](https://github.com/matrix-org/synapse/issues/11192))
   - Users admin API can now also modify user type in addition to allowing it to be set on user creation. ([\#11174](https://github.com/matrix-org/synapse/issues/11174))

   Bugfixes
   --------

   - Newly-created public rooms are now only assigned an alias if the room's creation has not been blocked by permission settings. Contributed by @AndrewFerr.
   ([\#10930](https://github.com/matrix-org/synapse/issues/10930))
   - Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#11001](https://github.com/matrix-org/synapse/issues/11001),
   [\#11009](https://github.com/matrix-org/synapse/issues/11009), [\#11012](https://github.com/matrix-org/synapse/issues/11012))
   - Fix 500 error on `/messages` when the server accumulates more than 5 backwards extremities at a given depth for a room. ([\#11027](https://github.com/matrix-org/synapse/issues/11027))
   - Fix a bug where setting a user's `external_id` via the admin API returns 500 and deletes user's existing external mappings if that external ID is already mapped.
   ([\#11051](https://github.com/matrix-org/synapse/issues/11051))
   - Fix a long-standing bug where users excluded from the user directory were added into the directory if they belonged to a room which became public or private.
   ([\#11075](https://github.com/matrix-org/synapse/issues/11075))
   - Fix a long-standing bug when attempting to preview URLs which are in the `windows-1252` character encoding. ([\#11077](https://github.com/matrix-org/synapse/issues/11077),
   [\#11089](https://github.com/matrix-org/synapse/issues/11089))
   - Fix broken export-data admin command and add test script checking the command to CI. ([\#11078](https://github.com/matrix-org/synapse/issues/11078))
   - Show an error when timestamp in seconds is provided to the `/purge_media_cache` Admin API. ([\#11101](https://github.com/matrix-org/synapse/issues/11101))
   - Fix local users who left all their rooms being removed from the user directory, even if the `search_all_users` config option was enabled.
   ([\#11103](https://github.com/matrix-org/synapse/issues/11103))
   - Fix a bug which caused the module API's `get_user_ip_and_agents` function to always fail on workers. `get_user_ip_and_agents` was introduced in 1.44.0 and did not function correctly on worker
   processes at the time. ([\#11112](https://github.com/matrix-org/synapse/issues/11112))
   - Identity server connection is no longer ignoring `ip_range_whitelist`. ([\#11120](https://github.com/matrix-org/synapse/issues/11120))
   - Fix a bug introduced in Synapse 1.45.0 breaking the configuration file parsing script. ([\#11145](https://github.com/matrix-org/synapse/issues/11145))
   - Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests.
   ([\#11177](https://github.com/matrix-org/synapse/issues/11177), [\#11190](https://github.com/matrix-org/synapse/issues/11190))
   - Resolve and share `state_groups` for all [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) historical events in batch. ([\#10975](https://github.com/matrix-org/synapse/issues/10975))

   Improved Documentation
   ----------------------

   - Fix broken links relating to module API deprecation in the upgrade notes. ([\#11069](https://github.com/matrix-org/synapse/issues/11069))
   - Add more information about what happens when a user is deactivated. ([\#11083](https://github.com/matrix-org/synapse/issues/11083))
   - Clarify the the sample log config can be copied from the documentation without issue. ([\#11092](https://github.com/matrix-org/synapse/issues/11092))
   - Update the admin API documentation with an updated list of the characters allowed in registration tokens. ([\#11093](https://github.com/matrix-org/synapse/issues/11093))
   - Document Synapse's behaviour when dealing with multiple modules registering the same callbacks and/or handlers for the same HTTP endpoints.
   ([\#11096](https://github.com/matrix-org/synapse/issues/11096))
   - Fix instances of `[example]{.title-ref}` in the upgrade documentation as a result of prior RST to Markdown conversion. ([\#11118](https://github.com/matrix-org/synapse/issues/11118))
   - Document the version of Synapse each module callback was introduced in. ([\#11132](https://github.com/matrix-org/synapse/issues/11132))
   - Document the version of Synapse that introduced each module API method. ([\#11183](https://github.com/matrix-org/synapse/issues/11183))

   Internal Changes
   ----------------
   - Fix spurious warnings about losing the logging context on the `ReplicationCommandHandler` when losing the replication connection. ([\#10984](https://github.com/matrix-org/synapse/issues/10984))
   - Include rejected status when we log events. ([\#11008](https://github.com/matrix-org/synapse/issues/11008))
   - Add some extra logging to the event persistence code. ([\#11014](https://github.com/matrix-org/synapse/issues/11014))
   - Rearrange the internal workings of the incremental user directory updates. ([\#11035](https://github.com/matrix-org/synapse/issues/11035))
   - Fix a long-standing bug where users excluded from the directory could still be added to the `users_who_share_private_rooms` table after a regular user joins a private room.
   ([\#11143](https://github.com/matrix-org/synapse/issues/11143))
   - Add and improve type hints. ([\#10972](https://github.com/matrix-org/synapse/issues/10972), [\#11055](https://github.com/matrix-org/synapse/issues/11055),
   [\#11066](https://github.com/matrix-org/synapse/issues/11066), [\#11076](https://github.com/matrix-org/synapse/issues/11076), [\#11095](https://github.com/matrix-org/synapse/issues/11095),
   [\#11109](https://github.com/matrix-org/synapse/issues/11109), [\#11121](https://github.com/matrix-org/synapse/issues/11121), [\#11146](https://github.com/matrix-org/synapse/issues/11146))
   - Mark the Synapse package as containing type annotations and fix export declarations so that Synapse pluggable modules may be type checked against Synapse.
   ([\#11054](https://github.com/matrix-org/synapse/issues/11054))
   - Remove dead code from `MediaFilePaths`. ([\#11056](https://github.com/matrix-org/synapse/issues/11056))
   - Be more lenient when parsing oEmbed response versions. ([\#11065](https://github.com/matrix-org/synapse/issues/11065))
   - Create a separate module for the retention configuration. ([\#11070](https://github.com/matrix-org/synapse/issues/11070))
   - Clean up some of the federation event authentication code for clarity. ([\#11115](https://github.com/matrix-org/synapse/issues/11115), [\#11116](https://github.com/matrix-org/synapse/issues/11116),
   [\#11122](https://github.com/matrix-org/synapse/issues/11122))
   - Add docstrings and comments to the application service ephemeral event sending code. ([\#11138](https://github.com/matrix-org/synapse/issues/11138))
   - Update the `sign_json` script to support inline configuration of the signing key. ([\#11139](https://github.com/matrix-org/synapse/issues/11139))
   - Fix broken link in the docker image README. ([\#11144](https://github.com/matrix-org/synapse/issues/11144))
   - Always dump logs from unit tests during CI runs. ([\#11068](https://github.com/matrix-org/synapse/issues/11068))
   - Add tests for `MediaFilePaths` class. ([\#11057](https://github.com/matrix-org/synapse/issues/11057))
   - Simplify the user admin API tests. ([\#11048](https://github.com/matrix-org/synapse/issues/11048))
   - Add a test for the workaround introduced in [\#11042](https://github.com/matrix-org/synapse/pull/11042) concerning the behaviour of third-party rule modules and `SynapseError`s.
   ([\#11071](https://github.com/matrix-org/synapse/issues/11071))

   Synapse 1.45.1 (2021-10-20)
   =============
   Bugfixes
   --------

   - Revert change to counting of deactivated users towards the monthly active users limit, introduced in 1.45.0rc1. ([\#11127](https://github.com/matrix-org/synapse/issues/11127))

   Synapse 1.45.0 (2021-10-19)
   =============
   No functional changes since Synapse 1.45.0rc2.

   Known Issues
   ------------

   - A suspected [performance regression](https://github.com/matrix-org/synapse/issues/11049) which was first reported after the release of 1.44.0 remains unresolved.

     We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

   Improved Documentation
   ----------------------

   - Reword changelog to clarify concerns about a suspected performance regression in 1.44.0. ([\#11117](https://github.com/matrix-org/synapse/issues/11117))

   Synapse 1.45.0rc2 (2021-10-14)
   ===============

   This release candidate [fixes](https://github.com/matrix-org/synapse/issues/11053) a user directory [bug](https://github.com/matrix-org/synapse/issues/11025) present in 1.45.0rc1.

   Known Issues
   ------------

   - A suspected [performance regression](https://github.com/matrix-org/synapse/issues/11049) which was first reported after the release of 1.44.0 remains unresolved.

     We have not been able to identify a probable cause. Affected users report that setting up a federation sender worker appears to alleviate symptoms of the regression.

   Bugfixes
   --------

   - Fix a long-standing bug when using multiple event persister workers where events were not correctly sent down `/sync` due to a race. ([\#11045](https://github.com/matrix-org/synapse/issues/11045))
   - Fix a bug introduced in Synapse 1.45.0rc1 where the user directory would stop updating if it processed an event from a
     user not in the `users` table. ([\#11053](https://github.com/matrix-org/synapse/issues/11053))
   - Fix a bug introduced in Synapse 1.44.0 when logging errors during oEmbed processing. ([\#11061](https://github.com/matrix-org/synapse/issues/11061))

   Internal Changes
   ----------------

   - Add an 'approximate difference' method to `StateFilter`. ([\#10825](https://github.com/matrix-org/synapse/issues/10825))
   - Fix inconsistent behavior of `get_last_client_by_ip` when reporting data that has not been stored in the database yet. ([\#10970](https://github.com/matrix-org/synapse/issues/10970))
   - Fix a bug introduced in Synapse 1.21.0 that causes opentracing and Prometheus metrics for replication requests to be measured incorrectly.
   ([\#10996](https://github.com/matrix-org/synapse/issues/10996))
   - Ensure that cache config tests do not share state. ([\#11036](https://github.com/matrix-org/synapse/issues/11036))

   Synapse 1.45.0rc1 (2021-10-12)
   ===============

   **Note:** Media storage providers module that read from Synapse's configuration need changes as of this version, see the [upgrade
   notes](https://matrix-org.github.io/synapse/develop/upgrade#upgrading-to-v1450) for more information.

   Known Issues
   ------------

   - We are investigating [a performance issue](https://github.com/matrix-org/synapse/issues/11049) which was reported after the release of 1.44.0.
   - We are aware of [a bug](https://github.com/matrix-org/synapse/issues/11025) with the user directory when using application services. A second release candidate is expected which will resolve this.

   Features
   --------

   - Add [MSC3069](https://github.com/matrix-org/matrix-doc/pull/3069) support to `/account/whoami`. ([\#9655](https://github.com/matrix-org/synapse/issues/9655))
   - Support autodiscovery of oEmbed previews. ([\#10822](https://github.com/matrix-org/synapse/issues/10822))
   - Add a `user_may_send_3pid_invite` spam checker callback for modules to allow or deny 3PID invites. ([\#10894](https://github.com/matrix-org/synapse/issues/10894))
   - Add a spam checker callback to allow or deny room joins. ([\#10910](https://github.com/matrix-org/synapse/issues/10910))
   - Include an `update_synapse_database` script in the distribution. Contributed by @Fizzadar at Beeper. ([\#10954](https://github.com/matrix-org/synapse/issues/10954))
   - Include exception information in JSON logging output. Contributed by @Fizzadar at Beeper. ([\#11028](https://github.com/matrix-org/synapse/issues/11028))

   Bugfixes
   --------

   - Fix a minor bug in the response to `/_matrix/client/r0/voip/turnServer`. Contributed by @lukaslihotzki. ([\#10922](https://github.com/matrix-org/synapse/issues/10922))
   - Fix a bug where empty `yyyy-mm-dd/` directories would be left behind in the media store's `url_cache_thumbnails/` directory. ([\#10924](https://github.com/matrix-org/synapse/issues/10924))
   - Fix a bug introduced in Synapse v1.40.0 where the signature checks for room version 8 and 9 could be applied to earlier room versions in some situations.
   ([\#10927](https://github.com/matrix-org/synapse/issues/10927))
   - Fix a long-standing bug wherein deactivated users still count towards the monthly active users limit. ([\#10947](https://github.com/matrix-org/synapse/issues/10947))
   - Fix a long-standing bug which meant that events received over federation were sometimes incorrectly accepted into the room state. ([\#10956](https://github.com/matrix-org/synapse/issues/10956))
   - Fix a long-standing bug where rebuilding the user directory wouldn't exclude support and deactivated users. ([\#10960](https://github.com/matrix-org/synapse/issues/10960))
   - Fix [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint rejecting subsequent batches with unknown batch ID error in existing room versions from the room creator.
   ([\#10962](https://github.com/matrix-org/synapse/issues/10962))
   - Fix a bug that could leak local users' per-room nicknames and avatars when the user directory is rebuilt. ([\#10981](https://github.com/matrix-org/synapse/issues/10981))
   - Fix a long-standing bug where the remainder of a batch of user directory changes would be silently dropped if the server left a room early in the batch.
   ([\#10982](https://github.com/matrix-org/synapse/issues/10982))
   - Correct a bugfix introduced in Synapse v1.44.0 that would catch the wrong error if a connection is lost before a response could be written to it.
   ([\#10995](https://github.com/matrix-org/synapse/issues/10995))
   - Fix a long-standing bug where local users' per-room nicknames/avatars were visible to anyone who could see you in the user directory. ([\#11002](https://github.com/matrix-org/synapse/issues/11002))
   - Fix a long-standing bug where a user's per-room nickname/avatar would overwrite their profile in the user directory when a room was made public.
   ([\#11003](https://github.com/matrix-org/synapse/issues/11003))
   - Work around a regression, introduced in Synapse v1.39.0, that caused `SynapseError`s raised by the experimental third-party rules module callback `check_event_allowed` to be ignored.
   ([\#11042](https://github.com/matrix-org/synapse/issues/11042))
   - Fix a bug in [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) insertion events in rooms that could cause cross-talk/conflicts between batches.
   ([\#10877](https://github.com/matrix-org/synapse/issues/10877))

   Improved Documentation
   ----------------------

   - Change wording ("reference homeserver") in Synapse repository documentation. Contributed by @maxkratz. ([\#10971](https://github.com/matrix-org/synapse/issues/10971))
   - Fix a dead URL in development documentation (SAML) and change wording from "Riot" to "Element". Contributed by @maxkratz. ([\#10973](https://github.com/matrix-org/synapse/issues/10973))
   - Add additional content to the Welcome and Overview page of the documentation. ([\#10990](https://github.com/matrix-org/synapse/issues/10990))
   - Update links to MSCs in documentation. Contributed by @dklimpel. ([\#10991](https://github.com/matrix-org/synapse/issues/10991))

   Internal Changes
   ----------------

   - Improve type hinting in `synapse.util`. ([\#10888](https://github.com/matrix-org/synapse/issues/10888))
   - Add further type hints to `synapse.storage.util`. ([\#10892](https://github.com/matrix-org/synapse/issues/10892))
   - Fix type hints to be compatible with an upcoming change to Twisted. ([\#10895](https://github.com/matrix-org/synapse/issues/10895))
   - Update utility code to handle C implementations of frozendict. ([\#10902](https://github.com/matrix-org/synapse/issues/10902))
   - Drop old functionality which maintained database compatibility with Synapse versions before v1.31. ([\#10903](https://github.com/matrix-org/synapse/issues/10903))
   - Clean-up configuration helper classes for the `ServerConfig` class. ([\#10915](https://github.com/matrix-org/synapse/issues/10915))
   - Use direct references to config flags. ([\#10916](https://github.com/matrix-org/synapse/issues/10916), [\#10959](https://github.com/matrix-org/synapse/issues/10959),
   [\#10985](https://github.com/matrix-org/synapse/issues/10985))
   - Clean up some of the federation event authentication code for clarity. ([\#10926](https://github.com/matrix-org/synapse/issues/10926), [\#10940](https://github.com/matrix-org/synapse/issues/10940),
   [\#10986](https://github.com/matrix-org/synapse/issues/10986), [\#10987](https://github.com/matrix-org/synapse/issues/10987), [\#10988](https://github.com/matrix-org/synapse/issues/10988),
   [\#11010](https://github.com/matrix-org/synapse/issues/11010), [\#11011](https://github.com/matrix-org/synapse/issues/11011))
   - Refactor various parts of the codebase to use `RoomVersion` objects instead of room version identifier strings. ([\#10934](https://github.com/matrix-org/synapse/issues/10934))
   - Refactor user directory tests in preparation for upcoming changes. ([\#10935](https://github.com/matrix-org/synapse/issues/10935))
   - Include the event id in the logcontext when handling PDUs received over federation. ([\#10936](https://github.com/matrix-org/synapse/issues/10936))
   - Fix logged errors in unit tests. ([\#10939](https://github.com/matrix-org/synapse/issues/10939))
   - Fix a broken test to ensure that consent configuration works during registration. ([\#10945](https://github.com/matrix-org/synapse/issues/10945))
   - Add type hints to filtering classes. ([\#10958](https://github.com/matrix-org/synapse/issues/10958))
   - Add type-hint to `HomeserverTestcase.setup_test_homeserver`. ([\#10961](https://github.com/matrix-org/synapse/issues/10961))
   - Fix the test utility function `create_room_as` so that `is_public=True` will explicitly set the `visibility` parameter of room creation requests to `public`. Contributed by @AndrewFerr.
   ([\#10963](https://github.com/matrix-org/synapse/issues/10963))
   - Make the release script more robust and transparent. ([\#10966](https://github.com/matrix-org/synapse/issues/10966))
   - Refactor [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` mega function into smaller handler functions. ([\#10974](https://github.com/matrix-org/synapse/issues/10974))
   - Log stack traces when a missing opentracing span is detected. ([\#10983](https://github.com/matrix-org/synapse/issues/10983))
   - Update GHA config to run tests against Python 3.10 and PostgreSQL 14. ([\#10992](https://github.com/matrix-org/synapse/issues/10992))
   - Fix a long-standing bug where `ReadWriteLock`s could drop logging contexts on exit. ([\#10993](https://github.com/matrix-org/synapse/issues/10993))
   - Add a `CODEOWNERS` file to automatically request reviews from the `@matrix-org/synapse-core` team on new pull requests. ([\#10994](https://github.com/matrix-org/synapse/issues/10994))
   - Add further type hints to `synapse.state`. ([\#11004](https://github.com/matrix-org/synapse/issues/11004))
   - Remove the deprecated `BaseHandler` object. ([\#11005](https://github.com/matrix-org/synapse/issues/11005))
   - Bump mypy version for CI to 0.910, and pull in new type stubs for dependencies. ([\#11006](https://github.com/matrix-org/synapse/issues/11006))
   - Fix CI to run the unit tests without optional deps. ([\#11017](https://github.com/matrix-org/synapse/issues/11017))
   - Ensure that cache config tests do not share state. ([\#11019](https://github.com/matrix-org/synapse/issues/11019))
   - Add additional type hints to `synapse.server_notices`. ([\#11021](https://github.com/matrix-org/synapse/issues/11021))
   - Add additional type hints for `synapse.push`. ([\#11023](https://github.com/matrix-org/synapse/issues/11023))
   - When installing the optional developer dependencies, also include the dependencies needed for type-checking and unit testing. ([\#11034](https://github.com/matrix-org/synapse/issues/11034))
   - Remove unnecessary list comprehension from `synapse_port_db` to satisfy code style requirements. ([\#11043](https://github.com/matrix-org/synapse/issues/11043))

   Synapse 1.44.0 (2021-10-05)
   =============
   No significant changes since 1.44.0rc3.

   Synapse 1.44.0rc3 (2021-10-04)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in Synapse v1.40.0 where changing a user's display name or avatar in a restricted room would cause an authentication error.
   ([\#10933](https://github.com/matrix-org/synapse/issues/10933))
   - Fix `/admin/whois/{user_id}` endpoint, which was broken in v1.44.0rc1. ([\#10968](https://github.com/matrix-org/synapse/issues/10968))

   Synapse 1.44.0rc2 (2021-09-30)
   ===============

   Bugfixes
   --------

   - Fix a bug introduced in v1.44.0rc1 which caused the experimental [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` endpoint to return a 500 error.
   ([\#10938](https://github.com/matrix-org/synapse/issues/10938))
   - Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services. ([\#10944](https://github.com/matrix-org/synapse/issues/10944))

   Improved Documentation
   ----------------------

   - Minor updates to the installation instructions. ([\#10919](https://github.com/matrix-org/synapse/issues/10919))

   Synapse 1.44.0rc1 (2021-09-29)
   ===============

   Features
   --------

   - Only allow the [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send?chunk_id=xxx` endpoint to connect to an already existing insertion event.
   ([\#10776](https://github.com/matrix-org/synapse/issues/10776))
   - Improve oEmbed URL previews by processing the author name, photo, and video information. ([\#10814](https://github.com/matrix-org/synapse/issues/10814),
   [\#10819](https://github.com/matrix-org/synapse/issues/10819))
   - Speed up responding with large JSON objects to requests. ([\#10868](https://github.com/matrix-org/synapse/issues/10868), [\#10905](https://github.com/matrix-org/synapse/issues/10905))
   - Add a `user_may_create_room_with_invites` spam checker callback to allow modules to allow or deny a room creation request based on the invites and/or 3PID invites it includes.
   ([\#10898](https://github.com/matrix-org/synapse/issues/10898))

   Bugfixes
   --------

   - Fix a long-standing bug that caused an `AssertionError` when purging history in certain rooms. Contributed by @Kokokokoka. ([\#10690](https://github.com/matrix-org/synapse/issues/10690))
   - Fix a long-standing bug which caused deactivated users that were later reactivated to be missing from the user directory. ([\#10782](https://github.com/matrix-org/synapse/issues/10782))
   - Fix a long-standing bug that caused unbanning a user by sending a membership event to fail. Contributed by @aaronraimist. ([\#10807](https://github.com/matrix-org/synapse/issues/10807))
   - Fix a long-standing bug where logging contexts would go missing when federation requests time out. ([\#10810](https://github.com/matrix-org/synapse/issues/10810))
   - Fix a long-standing bug causing an error in the deprecated `/initialSync` endpoint when using the undocumented `from` and `to` parameters.
   ([\#10827](https://github.com/matrix-org/synapse/issues/10827))
   - Fix a bug causing the `remove_stale_pushers` background job to repeatedly fail and log errors. This bug affected Synapse servers that had been upgraded from version 1.28 or older and are using
   SQLite. ([\#10843](https://github.com/matrix-org/synapse/issues/10843))
   - Fix a long-standing bug in Unicode support of the room search admin API breaking search for rooms with non-ASCII characters. ([\#10859](https://github.com/matrix-org/synapse/issues/10859))
   - Fix a bug introduced in Synapse 1.37.0 which caused `knock` membership events which we sent to remote servers to be incorrectly stored in the local database.
   ([\#10873](https://github.com/matrix-org/synapse/issues/10873))
   - Fix invalidating one-time key count cache after claiming keys. The bug was introduced in Synapse v1.41.0. Contributed by Tulir at Beeper.
   ([\#10875](https://github.com/matrix-org/synapse/issues/10875))
   - Fix a long-standing bug causing application service users to be subject to MAU blocking if the MAU limit had been reached, even if configured not to be blocked.
   ([\#10881](https://github.com/matrix-org/synapse/issues/10881))
   - Fix a long-standing bug which could cause events pulled over federation to be incorrectly rejected. ([\#10907](https://github.com/matrix-org/synapse/issues/10907))
   - Fix a long-standing bug causing URL cache files to be stored in storage providers. Server admins may safely delete the `url_cache/` and `url_cache_thumbnails/` directories from any configured
   storage providers to reclaim space. ([\#10911](https://github.com/matrix-org/synapse/issues/10911))
   - Fix a long-standing bug leading to race conditions when creating media store and config directories. ([\#10913](https://github.com/matrix-org/synapse/issues/10913))

   Improved Documentation
   ----------------------

   - Fix some crashes in the Module API example code, by adding JSON encoding/decoding. ([\#10845](https://github.com/matrix-org/synapse/issues/10845))
   - Add developer documentation about experimental configuration flags. ([\#10865](https://github.com/matrix-org/synapse/issues/10865))
   - Properly remove deleted files from GitHub pages when generating the documentation. ([\#10869](https://github.com/matrix-org/synapse/issues/10869))

   Internal Changes
   ----------------

   - Fix GitHub Actions config so we can run sytest on synapse from parallel branches. ([\#10659](https://github.com/matrix-org/synapse/issues/10659))
   - Split out [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) meta events to their own fields in the `/batch_send` response. ([\#10777](https://github.com/matrix-org/synapse/issues/10777))
   - Add missing type hints to REST servlets. ([\#10785](https://github.com/matrix-org/synapse/issues/10785), [\#10817](https://github.com/matrix-org/synapse/issues/10817))
   - Simplify the internal logic which maintains the user directory database tables. ([\#10796](https://github.com/matrix-org/synapse/issues/10796))
   - Use direct references to config flags. ([\#10812](https://github.com/matrix-org/synapse/issues/10812), [\#10885](https://github.com/matrix-org/synapse/issues/10885),
   [\#10893](https://github.com/matrix-org/synapse/issues/10893), [\#10897](https://github.com/matrix-org/synapse/issues/10897))
   - Specify the type of token in generic "Invalid token" error messages. ([\#10815](https://github.com/matrix-org/synapse/issues/10815))
   - Make `StateFilter` frozen so it is hashable. ([\#10816](https://github.com/matrix-org/synapse/issues/10816))
   - Fix a long-standing bug where an `m.room.message` event containing a null byte would cause an internal server error. ([\#10820](https://github.com/matrix-org/synapse/issues/10820))
   - Add type hints to the state database. ([\#10823](https://github.com/matrix-org/synapse/issues/10823))
   - Opt out of cache expiry for `get_users_who_share_room_with_user`, to hopefully improve `/sync` performance when you
     haven't synced recently. ([\#10826](https://github.com/matrix-org/synapse/issues/10826))
   - Track cache eviction rates more finely in Prometheus's monitoring. ([\#10829](https://github.com/matrix-org/synapse/issues/10829))
   - Add missing type hints to `synapse.handlers`. ([\#10831](https://github.com/matrix-org/synapse/issues/10831), [\#10856](https://github.com/matrix-org/synapse/issues/10856))
   - Extend the Module API to let plug-ins check whether an ID is local and to access IP + User Agent data. ([\#10833](https://github.com/matrix-org/synapse/issues/10833))
   - Factor out PNG image data to a constant to be used in several tests. ([\#10834](https://github.com/matrix-org/synapse/issues/10834))
   - Add a test to ensure state events sent by modules get persisted correctly. ([\#10835](https://github.com/matrix-org/synapse/issues/10835))
   - Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) fields and event types from `chunk` to `batch` to match the `/batch_send` endpoint.
   ([\#10838](https://github.com/matrix-org/synapse/issues/10838))
   - Rename [MSC2716](https://github.com/matrix-org/matrix-doc/pull/2716) `/batch_send` query parameter from `?prev_event` to more obvious usage with `?prev_event_id`.
   ([\#10839](https://github.com/matrix-org/synapse/issues/10839))
   - Add type hints to `synapse.http.site`. ([\#10867](https://github.com/matrix-org/synapse/issues/10867))
   - Include outlier status when we log V2 or V3 events. ([\#10879](https://github.com/matrix-org/synapse/issues/10879))
   - Break down Grafana's cache expiry time series based on reason for eviction, c.f. [\#10829](https://github.com/matrix-org/synapse/issues/10829).
   ([\#10880](https://github.com/matrix-org/synapse/issues/10880))
   - Clean up some of the federation event authentication code for clarity. ([\#10883](https://github.com/matrix-org/synapse/issues/10883), [\#10884](https://github.com/matrix-org/synapse/issues/10884),
   [\#10896](https://github.com/matrix-org/synapse/issues/10896), [\#10901](https://github.com/matrix-org/synapse/issues/10901))
   - Allow the `.` and `~` characters when creating registration tokens as per the change to [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
   ([\#10887](https://github.com/matrix-org/synapse/issues/10887))
   - Clean up some unnecessary parentheses in places around the codebase. ([\#10889](https://github.com/matrix-org/synapse/issues/10889))
   - Improve type hinting in the user directory code. ([\#10891](https://github.com/matrix-org/synapse/issues/10891))
   - Update development testing script `test_postgresql.sh` to use a supported Python version and make re-runs quicker. ([\#10906](https://github.com/matrix-org/synapse/issues/10906))
   - Document and summarize changes in schema version `61` – `64`. ([\#10917](https://github.com/matrix-org/synapse/issues/10917))
   - Update release script to sign the newly created git tags. ([\#10925](https://github.com/matrix-org/synapse/issues/10925))
   - Fix Debian builds due to `dh-virtualenv` no longer being able to build their docs. ([\#10931](https://github.com/matrix-org/synapse/issues/10931))


   To generate a diff of this commit:
   cvs rdiff -u -r1.34 -r1.35 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.18 -r1.19 pkgsrc/chat/matrix-synapse/PLIST
   cvs rdiff -u -r1.26 -r1.27 pkgsrc/chat/matrix-synapse/distinfo

-------------------------------------------------------------------
   Module Name:	pkgsrc
   Committed By:	gdt
   Date:		Tue Nov 23 12:47:51 UTC 2021

   Modified Files:
   	pkgsrc/chat/matrix-synapse: Makefile distinfo

   Log Message:
   chat/matrix-synapse: Update to 1.47.1 (security)

   Synapse 1.47.1 (2021-11-23)
   ======This release fixes a security issue in the media store, affecting all prior releases of Synapse. Server administrators are encouraged to update Synapse as soon as possible. We are not aware of these vulnerabilities being exploited in the wild.

   Server administrators who are unable to update Synapse may use the workarounds described in the linked GitHub Security Advisory below.

   Security advisory
   -----------------

   The following issue is fixed in 1.47.1.

   - **[GHSA-3hfw-x7gx-437c](https://github.com/matrix-org/synapse/security/advisories/GHSA-3hfw-x7gx-437c) / [CVE-2021-41281](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-41281): Path traversal when downloading remote media.**

     Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory, potentially outside the media store directory.

     The last two directories and file name of the path are chosen randomly by Synapse and cannot be controlled by an attacker, which limits the impact.

     Homeservers with the media repository disabled are unaffected. Homeservers configured with a federation whitelist are also unaffected.

     Fixed by [91f2bd090](https://github.com/matrix-org/synapse/commit/91f2bd090).


   To generate a diff of this commit:
   cvs rdiff -u -r1.35 -r1.36 pkgsrc/chat/matrix-synapse/Makefile
   cvs rdiff -u -r1.27 -r1.28 pkgsrc/chat/matrix-synapse/distinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
identity service kind:maintenance MSC which clarifies/updates existing spec merged A proposal whose PR has merged into the spec! proposal A matrix spec change proposal
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants