./chat/matrix-synapse, Reference homeserver for the Matrix decentralised comms protocol

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 1.25.0, Package name: matrix-synapse-1.25.0, Maintainer: js

Synapse is a reference "homeserver" implementation of Matrix from the core
development team at matrix.org, written in Python/Twisted. It is intended to
showcase the concept of Matrix and let folks see the spec in the context of a
codebase and let you run your own homeserver and generally help bootstrap the

Master sites:

SHA1: 803761f548caf1ac39832d4167f09f079a8012a9
RMD160: 2aa1aee07a1d67e1e983f20fafe4f16cfba40efb
Filesize: 6878.966 KB

Version history: (Expand)

CVS history: (Expand)

   2021-01-13 18:45:36 by Jonathan Schleifer | Files touched by this commit (3) | Package updated
Log message:
Update chat/matrix-synapse to 1.25

Synapse 1.25.0 (2021-01-13)

Ending Support for Python 3.5 and Postgres 9.5

With this release, the Synapse team is announcing a formal deprecation policy \ 
for our platform dependencies, like Python and PostgreSQL:

All future releases of Synapse will follow the upstream end-of-life schedules.

Which means:

* This is the last release which guarantees support for Python 3.5.
* We will end support for PostgreSQL 9.5 early next month.
* We will end support for Python 3.6 and PostgreSQL 9.6 near the end of the year.

Crucially, this means __we will not produce .deb packages for Debian 9 (Stretch) \ 
or Ubuntu 16.04 (Xenial)__ beyond the transition period described below.

The website https://endoflife.date/ has convenient summaries of the support \ 
schedules for projects like [Python](https://endoflife.date/python) and \ 

If you are unable to upgrade your environment to a supported version of Python \ 
or Postgres, we encourage you to consider using the [Synapse Docker \ 
images](./INSTALL.md#docker-images-and-ansible-playbooks) instead.

### Transition Period

We will make a good faith attempt to avoid breaking compatibility in all \ 
releases through the end of March 2021. However, critical security \ 
vulnerabilities in dependencies or other unanticipated circumstances may arise \ 
which necessitate breaking compatibility earlier.

We intend to continue producing .deb packages for Debian 9 (Stretch) and Ubuntu \ 
16.04 (Xenial) through the transition period.

Removal warning

The old [Purge Room \ 
API](https://github.com/matrix-org/synapse/t … ge_room.md)
and [Shutdown Room \ 
API](https://github.com/matrix-org/synapse/t … wn_room.md)
are deprecated and will be removed in a future release. They will be replaced by the
[Delete Room \ 
API](https://github.com/matrix-org/synapse/t … e-room-api).

`POST /_synapse/admin/v1/rooms/<room_id>/delete` replaces `POST \ 
/_synapse/admin/v1/purge_room` and
`POST /_synapse/admin/v1/shutdown_room/<room_id>`.


- Fix HTTP proxy support when using a proxy that is on a blacklisted IP. \ 
Introduced in v1.25.0rc1. Contributed by @Bubu. \ 

Synapse 1.25.0rc1 (2021-01-06)


- Add an admin API that lets server admins get power in rooms in which local \ 
users have power. ([\#8756](https://github.com/matrix-org/synapse/issues/8756))
- Add optional HTTP authentication to replication endpoints. \ 
- Improve the error messages printed as a result of configuration problems for \ 
extension modules. ([\#8874](https://github.com/matrix-org/synapse/issues/8874))
- Add the number of local devices to Room Details Admin API. Contributed by \ 
@dklimpel. ([\#8886](https://github.com/matrix-org/synapse/issues/8886))
- Add `X-Robots-Tag` header to stop web crawlers from indexing media. \ 
Contributed by Aaron Raimist. \ 
- Spam-checkers may now define their methods as `async`. \ 
- Add support for allowing users to pick their own user ID during a \ 
single-sign-on login. \ 
([\#8897](https://github.com/matrix-org/synapse/issues/8897), \ 
[\#8900](https://github.com/matrix-org/synapse/issues/8900), \ 
[\#8911](https://github.com/matrix-org/synapse/issues/8911), \ 
[\#8938](https://github.com/matrix-org/synapse/issues/8938), \ 
[\#8941](https://github.com/matrix-org/synapse/issues/8941), \ 
[\#8942](https://github.com/matrix-org/synapse/issues/8942), \ 
- Add an `email.invite_client_location` configuration option to send a web \ 
client location to the invite endpoint on the identity server which allows \ 
customisation of the email template. \ 
- The search term in the list room and list user Admin APIs is now treated as \ 
case-insensitive. ([\#8931](https://github.com/matrix-org/synapse/issues/8931))
- Apply an IP range blacklist to push and key revocation requests. \ 
([\#8821](https://github.com/matrix-org/synapse/issues/8821), \ 
[\#8870](https://github.com/matrix-org/synapse/issues/8870), \ 
- Add an option to allow re-use of user-interactive authentication sessions for \ 
a period of time. ([\#8970](https://github.com/matrix-org/synapse/issues/8970))
- Allow running the redact endpoint on workers. \ 


- Fix bug where we might not correctly calculate the current state for rooms \ 
with multiple extremities. \ 
- Fix a long-standing bug in the register admin endpoint \ 
(`/_synapse/admin/v1/register`) when the `mac` field was not provided. The \ 
endpoint now properly returns a 400 error. Contributed by @edwargix. \ 
- Fix a long-standing bug on Synapse instances supporting Single-Sign-On, where \ 
users would be prompted to enter their password to confirm certain actions, even \ 
though they have not set a password. \ 
- Fix a longstanding bug where a 500 error would be returned if the \ 
`Content-Length` header was not provided to the upload media resource. \ 
- Add additional validation to pusher URLs to be compliant with the \ 
specification. ([\#8865](https://github.com/matrix-org/synapse/issues/8865))
- Fix the error code that is returned when a user tries to register on a \ 
homeserver on which new-user registration has been disabled. \ 
- Fix a bug where `PUT /_synapse/admin/v2/users/<user_id>` failed to \ 
create a new user when `avatar_url` is specified. Bug introduced in Synapse \ 
v1.9.0. ([\#8872](https://github.com/matrix-org/synapse/issues/8872))
- Fix a 500 error when attempting to preview an empty HTML file. \ 
- Fix occasional deadlock when handling SIGHUP. \ 
- Fix login API to not ratelimit application services that have ratelimiting \ 
disabled. ([\#8920](https://github.com/matrix-org/synapse/issues/8920))
- Fix bug where we ratelimited auto joining of rooms on registration (using \ 
`auto_join_rooms` config). \ 
- Fix a bug where deactivated users appeared in the user directory when their \ 
profile information was updated. \ 
([\#8933](https://github.com/matrix-org/synapse/issues/8933), \ 
- Fix bug introduced in Synapse v1.24.0 which would cause an exception on \ 
startup if both `enabled` and `localdb_enabled` were set to `False` in the \ 
`password_config` setting of the configuration file. \ 
- Fix a bug where 500 errors would be returned if the \ 
`m.room_history_visibility` event had invalid content. \ 
- Fix a bug causing common English words to not be considered for a user \ 
directory search. ([\#8959](https://github.com/matrix-org/synapse/issues/8959))
- Fix bug where application services couldn't register new ghost users if the \ 
server had reached its MAU limit. \ 
- Fix a long-standing bug where a `m.image` event without a `url` would cause \ 
errors on push. ([\#8965](https://github.com/matrix-org/synapse/issues/8965))
- Fix a small bug in v2 state resolution algorithm, which could also cause \ 
performance issues for rooms with large numbers of power levels. \ 
- Add validation to the `sendToDevice` API to raise a missing parameters error \ 
instead of a 500 error. \ 
- Add validation of group IDs to raise a 400 error instead of a 500 eror. \ 

Improved Documentation

- Fix the "Event persist rate" section of the included grafana \ 
dashboard by adding missing prometheus rules. \ 
- Combine related media admin API docs. \ 
- Fix an error in the documentation for the SAML username mapping provider. \ 
- Clarify comments around template directories in `sample_config.yaml`. \ 
- Move instructions for database setup, adjusted heading levels and improved \ 
syntax highlighting in [INSTALL.md](../INSTALL.md). Contributed by @fossterer. \ 
- Update the example value of `group_creation_prefix` in the sample \ 
configuration. ([\#8992](https://github.com/matrix-org/synapse/issues/8992))
- Link the Synapse developer room to the development section in the docs. \ 

Deprecations and Removals

- Deprecate Shutdown Room and Purge Room Admin APIs. \ 

Internal Changes

- Properly store the mapping of external ID to Matrix ID for CAS users. \ 
([\#8856](https://github.com/matrix-org/synapse/issues/8856), \ 
- Remove some unnecessary stubbing from unit tests. \ 
- Remove unused `FakeResponse` class from unit tests. \ 
- Pass `room_id` to `get_auth_chain_difference`. \ 
- Add type hints to push module. \ 
([\#8880](https://github.com/matrix-org/synapse/issues/8880), \ 
[\#8882](https://github.com/matrix-org/synapse/issues/8882), \ 
[\#8901](https://github.com/matrix-org/synapse/issues/8901), \ 
[\#8940](https://github.com/matrix-org/synapse/issues/8940), \ 
[\#8943](https://github.com/matrix-org/synapse/issues/8943), \ 
- Simplify logic for handling user-interactive-auth via single-sign-on servers. \ 
- Skip the SAML tests if the requirements (`pysaml2` and `xmlsec1`) aren't \ 
available. ([\#8905](https://github.com/matrix-org/synapse/issues/8905))
- Fix multiarch docker image builds. \ 
- Don't publish `latest` docker image until all archs are built. \ 
- Various clean-ups to the structured logging and logging context code. \ 
([\#8916](https://github.com/matrix-org/synapse/issues/8916), \ 
- Automatically drop stale forward-extremities under some specific conditions. \ 
- Refactor test utilities for injecting HTTP requests. \ 
- Add a maximum size of 50 kilobytes to .well-known lookups. \ 
- Fix bug in `generate_log_config` script which made it write empty files. \ 
- Clean up tox.ini file; disable coverage checking for non-test runs. \ 
- Add type hints to the admin and room list handlers. \ 
- Add type hints to the receipts and user directory handlers. \ 
- Drop the unused `local_invites` table. \ 
- Add type hints to the base storage code. \ 
- Support using PyJWT v2.0.0 in the test suite. \ 
- Fix `tests.federation.transport.RoomDirectoryFederationTests` and ensure it \ 
runs in CI. ([\#8998](https://github.com/matrix-org/synapse/issues/8998))
- Add type hints to the crypto module. \ 
   2020-12-09 21:40:21 by Jonathan Schleifer | Files touched by this commit (3) | Package updated
Log message:
Update chat/matrix-synapse to 1.24.0

Synapse 1.24.0 (2020-12-09)

Due to the two security issues highlighted below, server administrators are
encouraged to update Synapse. We are not aware of these vulnerabilities being
exploited in the wild.

Security advisory

The following issues are fixed in v1.23.1 and v1.24.0.

- There is a denial of service attack
  ([CVE-2020-26257](https://cve.mitre.org/cgi-bin/cvename.c … 2020-26257))
  against the federation APIs in which future events will not be correctly sent
  to other servers over federation. This affects all servers that participate in
  open federation. (Fixed in \ 

- Synapse may be affected by OpenSSL
  [CVE-2020-1971](https://cve.mitre.org/cgi-bin/cvename.c … -2020-1971).
  Synapse administrators should ensure that they have the latest versions of
  the cryptography Python package installed.

To upgrade Synapse along with the cryptography package:

* Administrators using the [`matrix.org` Docker
  image](https://hub.docker.com/r/matrixdotorg/synapse/) or the [Debian/Ubuntu
  packages from
`matrix.org`](https://github.com/matrix-org/synapse/b … g-packages)
  should ensure that they have version 1.24.0 or 1.23.1 installed: these images \ 
  the updated packages.
* Administrators who have [installed Synapse from
source](https://github.com/matrix-org/synapse/b … rom-source)
  should upgrade the cryptography package within their virtualenv by running:
  <path_to_virtualenv>/bin/pip install 'cryptography>=3.3'
* Administrators who have installed Synapse from distribution packages should
  consult the information from their distributions.

Internal Changes

- Add a maximum version for pysaml2 on Python 3.5. \ 

Synapse 1.24.0rc2 (2020-12-04)


- Fix a regression in v1.24.0rc1 which failed to allow SAML mapping providers \ 
which were unable to redirect users to an additional page. \ 

Internal Changes

- Add support for the `prometheus_client` newer than 0.9.0. Contributed by \ 
Jordan Bancino. ([\#8875](https://github.com/matrix-org/synapse/issues/8875))

Synapse 1.24.0rc1 (2020-12-02)


- Add admin API for logging in as a user. \ 
- Allow specification of the SAML IdP if the metadata returns multiple IdPs. \ 
- Add support for re-trying generation of a localpart for OpenID Connect mapping \ 
providers. ([\#8801](https://github.com/matrix-org/synapse/issues/8801), \ 
- Allow the `Date` header through CORS. Contributed by Nicolas Chamo. \ 
- Add a config option, `push.group_by_unread_count`, which controls whether \ 
unread message counts in push notifications are defined as "the number of \ 
rooms with unread messages" or "total unread messages". \ 
- Add `force_purge` option to delete-room admin api. \ 


- Fix a bug where appservices may be sent an excessive amount of read receipts \ 
and presence. Broke in v1.22.0. \ 
- Fix a bug in some federation APIs which could lead to unexpected behaviour if \ 
different parameters were set in the URI and the request body. \ 
- Fix a bug where synctl could spawn duplicate copies of a worker. Contributed \ 
by Waylon Cude. ([\#8798](https://github.com/matrix-org/synapse/issues/8798))
- Allow per-room profiles to be used for the server notice user. \ 
- Fix a bug where logging could break after a call to SIGHUP. \ 
- Fix `register_new_matrix_user` failing with "Bad Request" when \ 
trailing slash is included in server URL. Contributed by @angdraug. \ 
- Fix a minor long-standing bug in login, where we would offer the `password` \ 
login type if a custom auth provider supported it, even if password login was \ 
disabled. ([\#8835](https://github.com/matrix-org/synapse/issues/8835))
- Fix a long-standing bug which caused Synapse to require unspecified parameters \ 
during user-interactive authentication. \ 
- Fix a bug introduced in v1.20.0 where the user-agent and IP address reported \ 
during user registration for CAS, OpenID Connect, and SAML were of the wrong \ 
form. ([\#8784](https://github.com/matrix-org/synapse/issues/8784))

Improved Documentation

- Clarify the usecase for a msisdn delegate. Contributed by Adrian Wannenmacher. \ 
- Remove extraneous comma from JSON example in User Admin API docs. \ 
- Update `turn-howto.md` with troubleshooting notes. \ 
- Fix the example on how to set the `Content-Type` header in nginx for the \ 
Client Well-Known URI. \ 
- Improve the documentation for the admin API to list all media in a room with \ 
respect to encrypted events. \ 
- Update the formatting of the `push` section of the homeserver config file to \ 
better align with the [code style \ 
guidelines](https://github.com/matrix-org/synapse/b … ile-format). \ 
- Improve documentation how to configure prometheus for workers. \ 
- Update example prometheus console. \ 

Deprecations and Removals

- Remove old `/_matrix/client/*/admin` endpoints which were deprecated since \ 
Synapse 1.20.0. ([\#8785](https://github.com/matrix-org/synapse/issues/8785))
- Disable pretty printing JSON responses for curl. Users who want pretty-printed \ 
output should use [jq](https://stedolan.github.io/jq/) in combination with curl. \ 
Contributed by @tulir. \ 

Internal Changes

- Simplify the way the `HomeServer` object caches its internal attributes. \ 
([\#8565](https://github.com/matrix-org/synapse/issues/8565), \ 
- Add an example and documentation for clock skew to the SAML2 sample \ 
configuration to allow for clock/time difference between the homserver and IdP. \ 
Contributed by @localguru. \ 
- Generalise `RoomMemberHandler._locally_reject_invite` to apply to more flows \ 
than just invite. ([\#8751](https://github.com/matrix-org/synapse/issues/8751))
- Generalise `RoomStore.maybe_store_room_on_invite` to handle other, non-invite \ 
membership events. ([\#8754](https://github.com/matrix-org/synapse/issues/8754))
- Refactor test utilities for injecting HTTP requests. \ 
([\#8757](https://github.com/matrix-org/synapse/issues/8757), \ 
[\#8758](https://github.com/matrix-org/synapse/issues/8758), \ 
[\#8759](https://github.com/matrix-org/synapse/issues/8759), \ 
[\#8760](https://github.com/matrix-org/synapse/issues/8760), \ 
[\#8761](https://github.com/matrix-org/synapse/issues/8761), \ 
- Consolidate logic between the OpenID Connect and SAML code. \ 
- Use `TYPE_CHECKING` instead of magic `MYPY` variable. \ 
- Add a commandline script to sign arbitrary json objects. \ 
- Minor log line improvements for the SSO mapping code used to generate Matrix \ 
IDs from SSO IDs. ([\#8773](https://github.com/matrix-org/synapse/issues/8773))
- Add additional error checking for OpenID Connect and SAML mapping providers. \ 
([\#8774](https://github.com/matrix-org/synapse/issues/8774), \ 
- Add type hints to HTTP abstractions. \ 
([\#8806](https://github.com/matrix-org/synapse/issues/8806), \ 
- Remove unnecessary function arguments and add typing to several membership \ 
replication classes. \ 
- Optimise the lookup for an invite from another homeserver when trying to \ 
reject it. ([\#8815](https://github.com/matrix-org/synapse/issues/8815))
- Add tests for `password_auth_provider`s. \ 
- Drop redundant database index on `event_json`. \ 
- Simplify `uk.half-shot.msc2778.login.application_service` login handler. \ 
- Refactor `password_auth_provider` support code. \ 
- Add missing `ordering` to background database updates. \ 
- Allow for specifying a room version when creating a room in unit tests via \ 
`RestHelper.create_room_as`. \ 
   2020-12-04 21:45:51 by Nia Alarie | Files touched by this commit (456)
Log message:
Revbump packages with a runtime Python dep but no version prefix.

For the Python 3.8 default switch.
   2020-11-18 22:06:08 by Jonathan Schleifer | Files touched by this commit (3) | Package updated
Log message:
Update chat/matrix-synapse to 1.23.0

Synapse 1.23.0 (2020-11-18)

This release changes the way structured logging is configured. See the [upgrade \ 
notes](UPGRADE.rst#upgrading-to-v1230) for details.

**Note**: We are aware of a trivially exploitable denial of service \ 
vulnerability in versions of Synapse prior to 1.20.0. Complete details will be \ 
disclosed on Monday, November 23rd. If you have not upgraded recently, please do \ 


- Fix a dependency versioning bug in the Dockerfile that prevented Synapse from \ 
starting. ([\#8767](https://github.com/matrix-org/synapse/issues/8767))

Synapse 1.23.0rc1 (2020-11-13)


- Add a push rule that highlights when a jitsi conference is created in a room. \ 
- Add an admin api to delete a single file or files that were not used for a \ 
defined time from server. Contributed by @dklimpel. \ 
- Split admin API for reported events (`GET /_synapse/admin/v1/event_reports`) \ 
into detail and list endpoints. This is a breaking change to #8217 which was \ 
introduced in Synapse v1.21.0. Those who already use this API should check their \ 
scripts. Contributed by @dklimpel. \ 
- Support generating structured logs via the standard logging configuration. \ 
([\#8607](https://github.com/matrix-org/synapse/issues/8607), \ 
- Add an admin API to allow server admins to list users' pushers. Contributed by \ 
@dklimpel. ([\#8610](https://github.com/matrix-org/synapse/issues/8610), \ 
- Add an admin API `GET /_synapse/admin/v1/users/<user_id>/media` to get \ 
information about uploaded media. Contributed by @dklimpel. \ 
- Add an admin API for local user media statistics. Contributed by @dklimpel. \ 
- Add `displayname` to Shared-Secret Registration for admins. \ 


- Fix fetching of E2E cross signing keys over federation when only one of the \ 
master key and device signing key is cached already. \ 
- Fix a bug where Synapse would blindly forward bad responses from federation to \ 
clients when retrieving profile information. \ 
- Fix a bug where the account validity endpoint would silently fail if the user \ 
ID did not have an expiration time. It now returns a 400 error. \ 
- Fix email notifications for invites without local state. \ 
- Fix handling of invalid group IDs to return a 400 rather than log an exception \ 
and return a 500. ([\#8628](https://github.com/matrix-org/synapse/issues/8628))
- Fix handling of User-Agent headers that are invalid UTF-8, which caused user \ 
agents of users to not get correctly recorded. \ 
- Fix a bug in the `joined_rooms` admin API if the user has never joined any \ 
rooms. The bug was introduced, along with the API, in v1.21.0. \ 
- Fix exception during handling multiple concurrent requests for remote media \ 
when using multiple media repositories. \ 
- Fix bug that prevented Synapse from recovering after losing connection to the \ 
database. ([\#8726](https://github.com/matrix-org/synapse/issues/8726))
- Fix bug where the `/_synapse/admin/v1/send_server_notice` API could send \ 
notices to non-notice rooms. \ 
- Fix PostgreSQL port script fails when DB has no backfilled events. Broke in \ 
v1.21.0. ([\#8729](https://github.com/matrix-org/synapse/issues/8729))
- Fix PostgreSQL port script to correctly handle foreign key constraints. Broke \ 
in v1.21.0. ([\#8730](https://github.com/matrix-org/synapse/issues/8730))
- Fix PostgreSQL port script so that it can be run again after a failure. Broke \ 
in v1.21.0. ([\#8755](https://github.com/matrix-org/synapse/issues/8755))

Improved Documentation

- Instructions for Azure AD in the OpenID Connect documentation. Contributed by \ 
peterk. ([\#8582](https://github.com/matrix-org/synapse/issues/8582))
- Improve the sample configuration for single sign-on providers. \ 
- Fix the filepath of Dex's example config and the link to Dex's Getting Started \ 
guide in the OpenID Connect docs. \ 
- Note support for Python 3.9. \ 
- Minor updates to docs on running tests. \ 
- Interlink prometheus/grafana documentation. \ 
- Notes on SSO logins and media_repository worker. \ 
- Document experimental support for running multiple event persisters. \ 
- Add information regarding the various sources of, and expected contributions \ 
to, Synapse's documentation to `CONTRIBUTING.md`. \ 
- Migrate documentation `docs/admin_api/event_reports` to markdown. \ 
- Add some helpful hints to the README for new Synapse developers. Contributed \ 
by @chagai95. ([\#8746](https://github.com/matrix-org/synapse/issues/8746))

Internal Changes

- Optimise `/createRoom` with multiple invited users. \ 
- Implement and use an `@lru_cache` decorator. \ 
- Don't instansiate Requester directly. \ 
- Type hints for `RegistrationStore`. \ 
- Change schema to support access tokens belonging to one user but granting \ 
access to another. ([\#8616](https://github.com/matrix-org/synapse/issues/8616))
- Remove unused OPTIONS handlers. \ 
- Run `mypy` as part of the lint.sh script. \ 
- Correct Synapse's PyPI package name in the OpenID Connect installation \ 
instructions. ([\#8634](https://github.com/matrix-org/synapse/issues/8634))
- Catch exceptions during initialization of `password_providers`. Contributed by \ 
Nicolai Søborg. ([\#8636](https://github.com/matrix-org/synapse/issues/8636))
- Fix typos and spelling errors in the code. \ 
- Reduce number of OpenTracing spans started. \ 
([\#8640](https://github.com/matrix-org/synapse/issues/8640), \ 
[\#8668](https://github.com/matrix-org/synapse/issues/8668), \ 
- Add field `total` to device list in admin API. \ 
- Add more type hints to the application services code. \ 
([\#8655](https://github.com/matrix-org/synapse/issues/8655), \ 
- Tell Black to format code for Python 3.5. \ 
- Don't pull event from DB when handling replication traffic. \ 
- Abstract some invite-related code in preparation for landing knocking. \ 
([\#8671](https://github.com/matrix-org/synapse/issues/8671), \ 
- Clarify representation of events in logfiles. \ 
- Don't require `hiredis` package to be installed to run unit tests. \ 
- Fix typing info on cache call signature to accept `on_invalidate`. \ 
- Fail tests if they do not await coroutines. \ 
- Improve start time by adding an index to `e2e_cross_signing_keys.stream_id`. \ 
- Re-organize the structured logging code to separate the TCP transport handling \ 
from the JSON formatting. \ 
- Use Python 3.8 in Docker images by default. \ 
- Remove the "draft" status of the Room Details Admin API. \ 
- Improve the error returned when a non-string displayname or avatar_url is used \ 
when updating a user's profile. \ 
- Block attempts by clients to send server ACLs, or redactions of server ACLs, \ 
that would result in the local server being blocked from the room. \ 
- Add metrics the allow the local sysadmin to track 3PID `/requestToken` \ 
requests. ([\#8712](https://github.com/matrix-org/synapse/issues/8712))
- Consolidate duplicated lists of purged tables that are checked in tests. \ 
- Add some `mdui:UIInfo` element examples for `saml2_config` in the homeserver \ 
config. ([\#8718](https://github.com/matrix-org/synapse/issues/8718))
- Improve the error message returned when a remote server incorrectly sets the \ 
`Content-Type` header in response to a JSON request. \ 
- Speed up repeated state resolutions on the same room by caching event ID to \ 
auth event ID lookups. \ 

Synapse 1.22.1 (2020-10-30)


- Fix a bug where an appservice may not be forwarded events for a room it was \ 
recently invited to. Broke in v1.22.0. \ 
- Fix `Object of type frozendict is not JSON serializable` exceptions when using \ 
third-party event rules. Broke in v1.22.0. \ 
   2020-10-27 22:52:35 by Jonathan Schleifer | Files touched by this commit (3) | Package updated
Log message:
Update chat/matrix-synapse to 1.22.0

Synapse 1.22.0 (2020-10-27)

No significant changes.

Synapse 1.22.0rc2 (2020-10-26)


- Fix bugs where ephemeral events were not sent to appservices. Broke in \ 
v1.22.0rc1. ([\#8648](https://github.com/matrix-org/synapse/issues/8648), \ 
- Fix `user_daily_visits` table to not have duplicate rows per user/device due \ 
to multiple user agents. Broke in v1.22.0rc1. \ 

Synapse 1.22.0rc1 (2020-10-22)


- Add a configuration option for always using the "userinfo endpoint" \ 
for OpenID Connect. This fixes support for some identity providers, e.g. GitLab. \ 
Contributed by Benjamin Koch. \ 
- Add ability for `ThirdPartyEventRules` modules to query and manipulate whether \ 
a room is in the public rooms directory. \ 
([\#8292](https://github.com/matrix-org/synapse/issues/8292), \ 
- Add support for olm fallback keys \ 
([MSC2732](https://github.com/matrix-org/matrix-doc/pull/2732)). \ 
([\#8312](https://github.com/matrix-org/synapse/issues/8312), \ 
- Add support for running background tasks in a separate worker process. \ 
([\#8369](https://github.com/matrix-org/synapse/issues/8369), \ 
[\#8458](https://github.com/matrix-org/synapse/issues/8458), \ 
[\#8489](https://github.com/matrix-org/synapse/issues/8489), \ 
[\#8513](https://github.com/matrix-org/synapse/issues/8513), \ 
[\#8544](https://github.com/matrix-org/synapse/issues/8544), \ 
- Add support for device dehydration \ 
([MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697)). \ 
- Add support for [MSC2409](https://github.com/matrix-org/matrix-doc/pull/2409), \ 
which allows sending typing, read receipts, and presence events to appservices. \ 
([\#8437](https://github.com/matrix-org/synapse/issues/8437), \ 
- Change default room version to "6", per \ 
[MSC2788](https://github.com/matrix-org/matrix-doc/pull/2788). \ 
- Add the ability to send non-membership events into a room via the `ModuleApi`. \ 
- Increase default upload size limit from 10M to 50M. Contributed by @Akkowicz. \ 
- Add support for modifying event content in `ThirdPartyRules` modules. \ 
([\#8535](https://github.com/matrix-org/synapse/issues/8535), \ 


- Fix a longstanding bug where invalid ignored users in account data could break \ 
clients. ([\#8454](https://github.com/matrix-org/synapse/issues/8454))
- Fix a bug where backfilling a room with an event that was missing the \ 
`redacts` field would break. \ 
- Don't attempt to respond to some requests if the client has already \ 
disconnected. ([\#8465](https://github.com/matrix-org/synapse/issues/8465))
- Fix message duplication if something goes wrong after persisting the event. \ 
- Fix incremental sync returning an incorrect `prev_batch` token in timeline \ 
section, which when used to paginate returned events that were included in the \ 
incremental sync. Broken since v0.16.0. \ 
- Expose the `uk.half-shot.msc2778.login.application_service` to clients from \ 
the login API. This feature was added in v1.21.0, but was not exposed as a \ 
potential login flow. \ 
- Fix error code for `/profile/{userId}/displayname` to be `M_BAD_JSON`. \ 
- Fix a bug introduced in v1.7.0 that could cause Synapse to insert values from \ 
non-state `m.room.retention` events into the `room_retention` database table. \ 
- Fix not sending events over federation when using sharded event writers. \ 
- Fix a long standing bug where email notifications for encrypted messages were \ 
blank. ([\#8545](https://github.com/matrix-org/synapse/issues/8545))
- Fix increase in the number of `There was no active span...` errors logged when \ 
using OpenTracing. ([\#8567](https://github.com/matrix-org/synapse/issues/8567))
- Fix a bug that prevented errors encountered during execution of the \ 
`synapse_port_db` from being correctly printed. \ 
- Fix appservice transactions to only include a maximum of 100 persistent and \ 
100 ephemeral events. \ 

Updates to the Docker image

- Added multi-arch support (arm64,arm/v7) for the docker images. Contributed by \ 
@maquis196. ([\#7921](https://github.com/matrix-org/synapse/issues/7921))
- Add support for passing commandline args to the synapse process. Contributed \ 
by @samuel-p. ([\#8390](https://github.com/matrix-org/synapse/issues/8390))

Improved Documentation

- Update the directions for using the manhole with coroutines. \ 
- Improve readme by adding new shield.io badges. \ 
- Added note about docker in manhole.md regarding which ip address to bind to. \ 
Contributed by @Maquis196. \ 
- Document the new behaviour of the `allowed_lifetime_min` and \ 
`allowed_lifetime_max` settings in the room retention configuration. \ 

Deprecations and Removals

- Drop unused `device_max_stream_id` table. \ 

Internal Changes

- Check for unreachable code with mypy. \ 
- Add unit test for event persister sharding. \ 
- Allow events to be sent to clients sooner when using sharded event persisters. \ 
([\#8439](https://github.com/matrix-org/synapse/issues/8439), \ 
[\#8488](https://github.com/matrix-org/synapse/issues/8488), \ 
[\#8496](https://github.com/matrix-org/synapse/issues/8496), \ 
- Configure `public_baseurl` when using demo scripts. \ 
- Add SQL logging on queries that happen during startup. \ 
- Speed up unit tests when using PostgreSQL. \ 
- Remove redundant database loads of stream_ordering for events we already have. \ 
- Reduce inconsistencies between codepaths for membership and non-membership \ 
events. ([\#8463](https://github.com/matrix-org/synapse/issues/8463))
- Combine `SpamCheckerApi` with the more generic `ModuleApi`. \ 
- Additional testing for `ThirdPartyEventRules`. \ 
- Add `-d` option to `./scripts-dev/lint.sh` to lint files that have changed \ 
since the last git commit. \ 
- Unblacklist some sytests. \ 
- Include the log level in the phone home stats. \ 
- Remove outdated sphinx documentation, scripts and configuration. \ 
- Clarify error message when plugin config parsers raise an error. \ 
- Remove the deprecated `Handlers` object. \ 
- Fix a threadsafety bug in unit tests. \ 
- Add user agent to user_daily_visits table. \ 
- Add type hints to various parts of the code base. \ 
([\#8407](https://github.com/matrix-org/synapse/issues/8407), \ 
[\#8505](https://github.com/matrix-org/synapse/issues/8505), \ 
[\#8507](https://github.com/matrix-org/synapse/issues/8507), \ 
[\#8547](https://github.com/matrix-org/synapse/issues/8547), \ 
[\#8562](https://github.com/matrix-org/synapse/issues/8562), \ 
- Remove unused code from the test framework. \ 
- Apply some internal fixes to the `HomeServer` class to make its code more \ 
idiomatic and statically-verifiable. \ 
- Factor out common code between `RoomMemberHandler._locally_reject_invite` and \ 
`EventCreationHandler.create_event`. \ 
- Improve database performance by executing more queries without starting \ 
transactions. ([\#8542](https://github.com/matrix-org/synapse/issues/8542))
- Rename `Cache` to `DeferredCache`, to better reflect its purpose. \ 
- Move metric registration code down into `LruCache`. \ 
([\#8561](https://github.com/matrix-org/synapse/issues/8561), \ 
- Replace `DeferredCache` with the lighter-weight `LruCache` where possible. \ 
- Add virtualenv-generated folders to `.gitignore`. \ 
- Add `get_immediate` method to `DeferredCache`. \ 
- Fix mypy not properly checking across the codebase, additionally, fix a typing \ 
assertion error in `handlers/auth.py`. \ 
- Fix `synmark` benchmark runner. \ 
- Modify `DeferredCache.get()` to return `Deferred`s instead of \ 
`ObservableDeferred`s. \ 
- Adjust a protocol-type definition to fit `sqlite3` assertions. \ 
- Support macOS on the `synmark` benchmark runner. \ 
- Update `mypy` static type checker to 0.790. \ 
([\#8583](https://github.com/matrix-org/synapse/issues/8583), \ 
- Re-organize the structured logging code to separate the TCP transport handling \ 
from the JSON formatting. \ 
- Remove extraneous unittest logging decorators from unit tests. \ 
- Minor optimisations in caching code. \ 
([\#8593](https://github.com/matrix-org/synapse/issues/8593), \ 
   2020-10-17 15:57:50 by Jonathan Schleifer | Files touched by this commit (1) | Package updated
Log message:
chat/matrix-synapse: Update dependencies

I missed that some dependencies now are required in a newer version.
   2020-10-17 13:42:35 by Jonathan Schleifer | Files touched by this commit (3) | Package updated
Log message:
Update chat/matrix-synapse to 1.21.2

Synapse 1.21.2 (2020-10-15)

Debian packages and Docker images have been rebuilt using the latest versions of \ 
dependency libraries, including authlib 0.15.1. Please see bugfixes below.

Security advisory

* HTML pages served via Synapse were vulnerable to cross-site scripting (XSS)
  attacks. All server administrators are encouraged to upgrade.
  ([CVE-2020-26891](https://cve.mitre.org/cgi-bin/cvename.c … 2020-26891))

  This fix was originally included in v1.21.0 but was missing a security advisory.

  This was reported by [Denis Kasak](https://github.com/dkasak).


- Fix rare bug where sending an event would fail due to a racey assertion. \ 
- An updated version of the authlib dependency is included in the Docker and \ 
Debian images to fix an issue using OpenID Connect. See \ 
[\#8534](https://github.com/matrix-org/synapse/issues/8534) for details.

Synapse 1.21.1 (2020-10-13)

This release fixes a regression in v1.21.0 that prevented debian packages from \ 
being built.
It is otherwise identical to v1.21.0.

Synapse 1.21.0 (2020-10-12)

No significant changes since v1.21.0rc3.

As [noted in
v1.20.0](https://github.com/matrix-org/synapse/b … 2020-09-22),
a future release will drop support for accessing Synapse's
[Admin API](https://github.com/matrix-org/synapse/t … /admin_api) \ 
under the
`/_matrix/client/*` endpoint prefixes. At that point, the Admin API will only
be accessible under `/_synapse/admin`.

Synapse 1.21.0rc3 (2020-10-08)


- Fix duplication of events on high traffic servers, caused by PostgreSQL `could \ 
not serialize access due to concurrent update` errors. \ 

Internal Changes

- Add Groovy Gorilla to the list of distributions we build `.deb`s for. \ 

Synapse 1.21.0rc2 (2020-10-02)


- Convert additional templates from inline HTML to Jinja2 templates. \ 


- Fix a regression in v1.21.0rc1 which broke thumbnails of remote media. \ 
- Do not expose the experimental \ 
`uk.half-shot.msc2778.login.application_service` flow in the login API, which \ 
caused a compatibility problem with Element iOS. \ 
- Fix malformed log line in new federation "catch up" logic. \ 
- Fix DB query on startup for negative streams which caused long start up times. \ 
Introduced in [\#8374](https://github.com/matrix-org/synapse/issues/8374). \ 

Synapse 1.21.0rc1 (2020-10-01)


- Require the user to confirm that their password should be reset after clicking \ 
the email confirmation link. \ 
- Add an admin API `GET /_synapse/admin/v1/event_reports` to read entries of \ 
table `event_reports`. Contributed by @dklimpel. \ 
- Consolidate the SSO error template across all configuration. \ 
([\#8248](https://github.com/matrix-org/synapse/issues/8248), \ 
- Add a configuration option to specify a whitelist of domains that a user can \ 
be redirected to after validating their email or phone number. \ 
([\#8275](https://github.com/matrix-org/synapse/issues/8275), \ 
- Add experimental support for sharding event persister. \ 
([\#8294](https://github.com/matrix-org/synapse/issues/8294), \ 
[\#8387](https://github.com/matrix-org/synapse/issues/8387), \ 
[\#8396](https://github.com/matrix-org/synapse/issues/8396), \ 
- Add the room topic and avatar to the room details admin API. \ 
- Add an admin API for querying rooms where a user is a member. Contributed by \ 
@dklimpel. ([\#8306](https://github.com/matrix-org/synapse/issues/8306))
- Add `uk.half-shot.msc2778.login.application_service` login type to allow \ 
appservices to login. \ 
- Add a configuration option that allows existing users to log in with OpenID \ 
Connect. Contributed by @BBBSnowball and @OmmyZhang. \ 
- Add prometheus metrics for replication requests. \ 
- Support passing additional single sign-on parameters to the client. \ 
- Add experimental reporting of metrics on expensive rooms for state-resolution. \ 
- Add experimental prometheus metric to track numbers of "large" rooms \ 
for state resolutiom. \ 
- Add prometheus metrics to track federation delays. \ 


- Fix a bug in the media repository where remote thumbnails with the same size \ 
but different crop methods would overwrite each other. Contributed by \ 
@deepbluev7. ([\#7124](https://github.com/matrix-org/synapse/issues/7124))
- Fix inconsistent handling of non-existent push rules, and stop tracking the \ 
`enabled` state of removed push rules. \ 
- Fix a longstanding bug when storing a media file with an empty `upload_name`. \ 
- Fix messages not being sent over federation until an event is sent into the \ 
same room. ([\#8230](https://github.com/matrix-org/synapse/issues/8230), \ 
[\#8247](https://github.com/matrix-org/synapse/issues/8247), \ 
[\#8258](https://github.com/matrix-org/synapse/issues/8258), \ 
[\#8272](https://github.com/matrix-org/synapse/issues/8272), \ 
- Fix a longstanding bug where files that could not be thumbnailed would result \ 
in an Internal Server Error. \ 
([\#8236](https://github.com/matrix-org/synapse/issues/8236), \ 
- Upgrade minimum version of `canonicaljson` to version 1.4.0, to fix an unicode \ 
encoding issue. ([\#8262](https://github.com/matrix-org/synapse/issues/8262))
- Fix longstanding bug which could lead to incomplete database upgrades on \ 
SQLite. ([\#8265](https://github.com/matrix-org/synapse/issues/8265))
- Fix stack overflow when stderr is redirected to the logging system, and the \ 
logging system encounters an error. \ 
- Fix a bug which cause the logging system to report errors, if `DEBUG` was \ 
enabled and no `context` filter was applied. \ 
- Fix edge case where push could get delayed for a user until a later event was \ 
pushed. ([\#8287](https://github.com/matrix-org/synapse/issues/8287))
- Fix fetching malformed events from remote servers. \ 
- Fix `UnboundLocalError` from occuring when appservices send a malformed \ 
register request. ([\#8329](https://github.com/matrix-org/synapse/issues/8329))
- Don't send push notifications to expired user accounts. \ 
- Fix a regression in v1.19.0 with reactivating users through the admin API. \ 
- Fix a bug where during device registration the length of the device name \ 
wasn't limited. ([\#8364](https://github.com/matrix-org/synapse/issues/8364))
- Include `guest_access` in the fields that are checked for null bytes when \ 
updating `room_stats_state`. Broke in v1.7.2. \ 
- Fix theoretical race condition where events are not sent down `/sync` if the \ 
synchrotron worker is restarted without restarting other workers. \ 
- Fix a bug which could cause errors in rooms with malformed membership events, \ 
on servers using sqlite. \ 
- Fix "Re-starting finished log context" warning when receiving an \ 
event we already had over federation. \ 
- Fix incorrect handling of timeouts on outgoing HTTP requests. \ 
- Fix a regression in v1.20.0 in the `synapse_port_db` script regarding the \ 
`ui_auth_sessions_ips` table. \ 
- Remove unnecessary 3PID registration check when resetting password via an \ 
email address. Bug introduced in v0.34.0rc2. \ 

Improved Documentation

- Add `/_synapse/client` to the reverse proxy documentation. \ 
- Add note to the reverse proxy settings documentation about disabling Apache's \ 
mod_security2. Contributed by Julian Fietkau (@jfietkau). \ 
- Improve description of `server_name` config option in `homserver.yaml`. \ 

Deprecations and Removals

- Drop support for `prometheus_client` older than 0.4.0. \ 

Internal Changes

- Fix tests on distros which disable TLSv1.0. Contributed by @danc86. \ 
- Simplify the distributor code to avoid unnecessary work. \ 
- Remove the `populate_stats_process_rooms_2` background job and restore \ 
functionality to `populate_stats_process_rooms`. \ 
- Clean up type hints for `PaginationConfig`. \ 
([\#8250](https://github.com/matrix-org/synapse/issues/8250), \ 
- Track the latest event for every destination and room for catch-up after \ 
federation outage. ([\#8256](https://github.com/matrix-org/synapse/issues/8256))
- Fix non-user visible bug in implementation of \ 
`MultiWriterIdGenerator.get_current_token_for_writer`. \ 
- Switch to the JSON implementation from the standard library. \ 
- Add type hints to `synapse.util.async_helpers`. \ 
- Simplify tests that mock asynchronous functions. \ 
- Add type hints to `StreamToken` and `RoomStreamToken` classes. \ 
- Change `StreamToken.room_key` to be a `RoomStreamToken` instance. \ 
- Refactor notifier code to correctly use the max event stream position. \ 
- Use slotted classes where possible. \ 
- Support testing the local Synapse checkout against the [Complement homeserver \ 
test suite](https://github.com/matrix-org/complement/). \ 
- Update outdated usages of `metaclass` to python 3 syntax. \ 
- Move lint-related dependencies to package-extra field, update CONTRIBUTING.md \ 
to utilise this. ([\#8330](https://github.com/matrix-org/synapse/issues/8330), \ 
- Use the `admin_patterns` helper in additional locations. \ 
- Fix test logging to allow braces in log output. \ 
- Remove `__future__` imports related to Python 2 compatibility. \ 
- Simplify `super()` calls to Python 3 syntax. \ 
- Fix bad merge from `release-v1.20.0` branch to `develop`. \ 
- Factor out a `_send_dummy_event_for_room` method. \ 
- Improve logging of state resolution. \ 
- Add type annotations to `SimpleHttpClient`. \ 
- Refactor ID generators to use `async with` syntax. \ 
- Add `EventStreamPosition` type. \ 
- Create a mechanism for marking tests "logcontext clean". \ 
- A pair of tiny cleanups in the federation request code. \ 
- Add checks on startup that PostgreSQL sequences are consistent with their \ 
associated tables. ([\#8402](https://github.com/matrix-org/synapse/issues/8402))
- Do not include appservice users when calculating the total MAU for a server. \ 
- Typing fixes for `synapse.handlers.federation`. \ 
- Various refactors to simplify stream token handling. \ 
- Make stream token serializing/deserializing async. \ 
   2020-09-26 02:23:29 by Jonathan Schleifer | Files touched by this commit (2) | Package updated
Log message:
matrix-synapse: Update to 1.20.1

OK from gdt@ to update despite freeze.

Synapse 1.20.1 (2020-09-24)


    Fix a bug introduced in v1.20.0 which caused the synapse_port_db script to \ 
fail. (#8386)
    Fix a bug introduced in v1.20.0 which caused variables to be incorrectly \ 
escaped in Jinja2 templates. (#8394)