Brendan Abolivier
72efaa2edd
Merge tag 'v1.33.2' into babolivier/dinsic_1.41.0
...
Synapse 1.33.2 (2021-05-11)
===========================
Due to the security issue highlighted below, server administrators are encouraged to update Synapse. We are not aware of these vulnerabilities being exploited in the wild.
Security advisory
-----------------
This release fixes a denial of service attack ([CVE-2021-29471](https://github.com/matrix-org/synapse/security/advisories/GHSA-x345-32rc-8h85 )) against Synapse's push rules implementation. Server admins are encouraged to upgrade.
Internal Changes
----------------
- Unpin attrs dependency. ([\#9946](https://github.com/matrix-org/synapse/issues/9946 ))
2021-08-31 14:53:42 +01:00
Brendan Abolivier
1d4f5c34d8
Merge tag 'v1.33.0' into babolivier/dinsic_1.41.0
...
Synapse 1.33.0 (2021-05-05)
===========================
Features
--------
- Build Debian packages for Ubuntu 21.04 (Hirsute Hippo). ([\#9909](https://github.com/matrix-org/synapse/issues/9909 ))
Synapse 1.33.0rc2 (2021-04-29)
==============================
Bugfixes
--------
- Fix tight loop when handling presence replication when using workers. Introduced in v1.33.0rc1. ([\#9900](https://github.com/matrix-org/synapse/issues/9900 ))
Synapse 1.33.0rc1 (2021-04-28)
==============================
Features
--------
- Update experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083 ): restricting room access via group membership. ([\#9800](https://github.com/matrix-org/synapse/issues/9800 ), [\#9814](https://github.com/matrix-org/synapse/issues/9814 ))
- Add experimental support for handling presence on a worker. ([\#9819](https://github.com/matrix-org/synapse/issues/9819 ), [\#9820](https://github.com/matrix-org/synapse/issues/9820 ), [\#9828](https://github.com/matrix-org/synapse/issues/9828 ), [\#9850](https://github.com/matrix-org/synapse/issues/9850 ))
- Return a new template when an user attempts to renew their account multiple times with the same token, stating that their account is set to expire. This replaces the invalid token template that would previously be shown in this case. This change concerns the optional account validity feature. ([\#9832](https://github.com/matrix-org/synapse/issues/9832 ))
Bugfixes
--------
- Fixes the OIDC SSO flow when using a `public_baseurl` value including a non-root URL path. ([\#9726](https://github.com/matrix-org/synapse/issues/9726 ))
- Fix thumbnail generation for some sites with non-standard content types. Contributed by @rkfg. ([\#9788](https://github.com/matrix-org/synapse/issues/9788 ))
- Add some sanity checks to identity server passed to 3PID bind/unbind endpoints. ([\#9802](https://github.com/matrix-org/synapse/issues/9802 ))
- Limit the size of HTTP responses read over federation. ([\#9833](https://github.com/matrix-org/synapse/issues/9833 ))
- Fix a bug which could cause Synapse to get stuck in a loop of resyncing device lists. ([\#9867](https://github.com/matrix-org/synapse/issues/9867 ))
- Fix a long-standing bug where errors from federation did not propagate to the client. ([\#9868](https://github.com/matrix-org/synapse/issues/9868 ))
Improved Documentation
----------------------
- Add a note to the docker docs mentioning that we mirror upstream's supported Docker platforms. ([\#9801](https://github.com/matrix-org/synapse/issues/9801 ))
Internal Changes
----------------
- Add a dockerfile for running Synapse in worker-mode under Complement. ([\#9162](https://github.com/matrix-org/synapse/issues/9162 ))
- Apply `pyupgrade` across the codebase. ([\#9786](https://github.com/matrix-org/synapse/issues/9786 ))
- Move some replication processing out of `generic_worker`. ([\#9796](https://github.com/matrix-org/synapse/issues/9796 ))
- Replace `HomeServer.get_config()` with inline references. ([\#9815](https://github.com/matrix-org/synapse/issues/9815 ))
- Rename some handlers and config modules to not duplicate the top-level module. ([\#9816](https://github.com/matrix-org/synapse/issues/9816 ))
- Fix a long-standing bug which caused `max_upload_size` to not be correctly enforced. ([\#9817](https://github.com/matrix-org/synapse/issues/9817 ))
- Reduce CPU usage of the user directory by reusing existing calculated room membership. ([\#9821](https://github.com/matrix-org/synapse/issues/9821 ))
- Small speed up for joining large remote rooms. ([\#9825](https://github.com/matrix-org/synapse/issues/9825 ))
- Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9838](https://github.com/matrix-org/synapse/issues/9838 ))
- Only store the raw data in the in-memory caches, rather than objects that include references to e.g. the data stores. ([\#9845](https://github.com/matrix-org/synapse/issues/9845 ))
- Limit length of accepted email addresses. ([\#9855](https://github.com/matrix-org/synapse/issues/9855 ))
- Remove redundant `synapse.types.Collection` type definition. ([\#9856](https://github.com/matrix-org/synapse/issues/9856 ))
- Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts. ([\#9858](https://github.com/matrix-org/synapse/issues/9858 ))
- Disable invite rate-limiting by default when running the unit tests. ([\#9871](https://github.com/matrix-org/synapse/issues/9871 ))
- Pass a reactor into `SynapseSite` to make testing easier. ([\#9874](https://github.com/matrix-org/synapse/issues/9874 ))
- Make `DomainSpecificString` an `attrs` class. ([\#9875](https://github.com/matrix-org/synapse/issues/9875 ))
- Add type hints to `synapse.api.auth` and `synapse.api.auth_blocking` modules. ([\#9876](https://github.com/matrix-org/synapse/issues/9876 ))
- Remove redundant `_PushHTTPChannel` test class. ([\#9878](https://github.com/matrix-org/synapse/issues/9878 ))
- Remove backwards-compatibility code for Python versions < 3.6. ([\#9879](https://github.com/matrix-org/synapse/issues/9879 ))
- Small performance improvement around handling new local presence updates. ([\#9887](https://github.com/matrix-org/synapse/issues/9887 ))
2021-08-31 14:53:31 +01:00
Brendan Abolivier
06690b167a
Merge tag 'v1.32.2' into babolivier/dinsic_1.41.0
...
Synapse 1.32.2 (2021-04-22)
===========================
This release includes a fix for a regression introduced in 1.32.0.
Bugfixes
--------
- Fix a regression in Synapse 1.32.0 and 1.32.1 which caused `LoggingContext` errors in plugins. ([\#9857](https://github.com/matrix-org/synapse/issues/9857 ))
2021-08-31 11:40:37 +01:00
Brendan Abolivier
9de3991b9e
Merge tag 'v1.32.0' into babolivier/dinsic_1.41.0
...
Synapse 1.32.0 (2021-04-20)
===========================
**Note:** This release requires Python 3.6+ and Postgres 9.6+ or SQLite 3.22+.
This release removes the deprecated `GET /_synapse/admin/v1/users/<user_id>` admin API. Please use the [v2 API](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/user_admin_api.rst#query-user-account ) instead, which has improved capabilities.
This release requires Application Services to use type `m.login.application_service` when registering users via the `/_matrix/client/r0/register` endpoint to comply with the spec. Please ensure your Application Services are up to date.
Bugfixes
--------
- Fix the log lines of nested logging contexts. Broke in 1.32.0rc1. ([\#9829](https://github.com/matrix-org/synapse/issues/9829 ))
Synapse 1.32.0rc1 (2021-04-13)
==============================
Features
--------
- Add a Synapse module for routing presence updates between users. ([\#9491](https://github.com/matrix-org/synapse/issues/9491 ))
- Add an admin API to manage ratelimit for a specific user. ([\#9648](https://github.com/matrix-org/synapse/issues/9648 ))
- Include request information in structured logging output. ([\#9654](https://github.com/matrix-org/synapse/issues/9654 ))
- Add `order_by` to the admin API `GET /_synapse/admin/v2/users`. Contributed by @dklimpel. ([\#9691](https://github.com/matrix-org/synapse/issues/9691 ))
- Replace the `room_invite_state_types` configuration setting with `room_prejoin_state`. ([\#9700](https://github.com/matrix-org/synapse/issues/9700 ))
- Add experimental support for [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083 ): restricting room access via group membership. ([\#9717](https://github.com/matrix-org/synapse/issues/9717 ), [\#9735](https://github.com/matrix-org/synapse/issues/9735 ))
- Update experimental support for Spaces: include `m.room.create` in the room state sent with room-invites. ([\#9710](https://github.com/matrix-org/synapse/issues/9710 ))
- Synapse now requires Python 3.6 or later. It also requires Postgres 9.6 or later or SQLite 3.22 or later. ([\#9766](https://github.com/matrix-org/synapse/issues/9766 ))
Bugfixes
--------
- Prevent `synapse_forward_extremities` and `synapse_excess_extremity_events` Prometheus metrics from initially reporting zero-values after startup. ([\#8926](https://github.com/matrix-org/synapse/issues/8926 ))
- Fix recently added ratelimits to correctly honour the application service `rate_limited` flag. ([\#9711](https://github.com/matrix-org/synapse/issues/9711 ))
- Fix longstanding bug which caused `duplicate key value violates unique constraint "remote_media_cache_thumbnails_media_origin_media_id_thumbna_key"` errors. ([\#9725](https://github.com/matrix-org/synapse/issues/9725 ))
- Fix bug where sharded federation senders could get stuck repeatedly querying the DB in a loop, using lots of CPU. ([\#9770](https://github.com/matrix-org/synapse/issues/9770 ))
- Fix duplicate logging of exceptions thrown during federation transaction processing. ([\#9780](https://github.com/matrix-org/synapse/issues/9780 ))
Updates to the Docker image
---------------------------
- Move opencontainers labels to the final Docker image such that users can inspect them. ([\#9765](https://github.com/matrix-org/synapse/issues/9765 ))
Improved Documentation
----------------------
- Make the `allowed_local_3pids` regex example in the sample config stricter. ([\#9719](https://github.com/matrix-org/synapse/issues/9719 ))
Deprecations and Removals
-------------------------
- Remove old admin API `GET /_synapse/admin/v1/users/<user_id>`. ([\#9401](https://github.com/matrix-org/synapse/issues/9401 ))
- Make `/_matrix/client/r0/register` expect a type of `m.login.application_service` when an Application Service registers a user, to align with [the relevant spec](https://spec.matrix.org/unstable/application-service-api/#server-admin-style-permissions ). ([\#9548](https://github.com/matrix-org/synapse/issues/9548 ))
Internal Changes
----------------
- Replace deprecated `imp` module with successor `importlib`. Contributed by Cristina Muñoz. ([\#9718](https://github.com/matrix-org/synapse/issues/9718 ))
- Experiment with GitHub Actions for CI. ([\#9661](https://github.com/matrix-org/synapse/issues/9661 ))
- Introduce flake8-bugbear to the test suite and fix some of its lint violations. ([\#9682](https://github.com/matrix-org/synapse/issues/9682 ))
- Update `scripts-dev/complement.sh` to use a local checkout of Complement, allow running a subset of tests and have it use Synapse's Complement test blacklist. ([\#9685](https://github.com/matrix-org/synapse/issues/9685 ))
- Improve Jaeger tracing for `to_device` messages. ([\#9686](https://github.com/matrix-org/synapse/issues/9686 ))
- Add release helper script for automating part of the Synapse release process. ([\#9713](https://github.com/matrix-org/synapse/issues/9713 ))
- Add type hints to expiring cache. ([\#9730](https://github.com/matrix-org/synapse/issues/9730 ))
- Convert various testcases to `HomeserverTestCase`. ([\#9736](https://github.com/matrix-org/synapse/issues/9736 ))
- Start linting mypy with `no_implicit_optional`. ([\#9742](https://github.com/matrix-org/synapse/issues/9742 ))
- Add missing type hints to federation handler and server. ([\#9743](https://github.com/matrix-org/synapse/issues/9743 ))
- Check that a `ConfigError` is raised, rather than simply `Exception`, when appropriate in homeserver config file generation tests. ([\#9753](https://github.com/matrix-org/synapse/issues/9753 ))
- Fix incompatibility with `tox` 2.5. ([\#9769](https://github.com/matrix-org/synapse/issues/9769 ))
- Enable Complement tests for [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946 ): Spaces Summary API. ([\#9771](https://github.com/matrix-org/synapse/issues/9771 ))
- Use mock from the standard library instead of a separate package. ([\#9772](https://github.com/matrix-org/synapse/issues/9772 ))
- Update Black configuration to target Python 3.6. ([\#9781](https://github.com/matrix-org/synapse/issues/9781 ))
- Add option to skip unit tests when building Debian packages. ([\#9793](https://github.com/matrix-org/synapse/issues/9793 ))
2021-08-31 11:40:27 +01:00
Mathieu Velten
9691665147
Fix formatting
2021-08-30 16:14:35 +02:00
Mathieu Velten
bf461ad7b4
Fix deactivation
2021-08-30 16:14:35 +02:00
Brendan Abolivier
1c77d90c1f
Incorporate fixes from https://github.com/matrix-org/synapse-freeze-room
2021-07-29 18:09:14 +01:00
Brendan Abolivier
807f821878
Use an org.matrix namespace for the frozen state event
...
Otherwise it's weird to publish the extracted module to matrix-org
2021-07-27 14:49:10 +01:00
Brendan Abolivier
1a1a83abcb
Rework room freeze and implement unfreezing the room ( #100 )
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2021-07-22 17:50:07 +02:00
Brendan Abolivier
fcc10d9caa
Merge pull request #99 from matrix-org/anoa/fix_pipeline
...
Switch back to using Sytest dinsic branch
2021-07-13 15:53:19 +02:00
Andrew Morgan
eedaf793b9
Note the debian version of the sytest image we're using
2021-05-21 17:28:19 +01:00
Andrew Morgan
8231769c98
Switch back to using Sytest dinsic branch
...
As part of the 1.31.0 mainline merge, we updated the buildkite pipeline to
more closely match mainline. Unfortunately we accidentally also updated the
sytest portion verbatim, which meant we were now running Sytest develop
against dinsic. This inevitably broke as dinsic started to fall behind
mainline again.
This commit returns us back to the dinsic tag of matrixdotorg/sytest-synapse,
as well as removes some Linux distro variations which we aren't using
for dinsic.
2021-05-21 16:28:03 +01:00
Mathieu Velten
b2932910c3
Unbind using bind_new_user_emails_to_sydent if specified ( #98 )
2021-05-21 17:27:09 +02:00
Brendan Abolivier
d1473f7362
Use link to advisory rather than to the CVE repo
v1.33.2
2021-05-11 14:09:46 +01:00
Brendan Abolivier
86fb71431c
1.33.2
2021-05-11 14:01:32 +01:00
Richard van der Hoff
03318a766c
Merge pull request from GHSA-x345-32rc-8h85
...
* tests for push rule pattern matching
* tests for acl pattern matching
* factor out common `re.escape`
* Factor out common re.compile
* Factor out common anchoring code
* add word_boundary support to `glob_to_regex`
* Use `glob_to_regex` in push rule evaluator
NB that this drops support for character classes. I don't think anyone ever
used them.
* Improve efficiency of globs with multiple wildcards
The idea here is that we compress multiple `*` globs into a single `.*`. We
also need to consider `?`, since `*?*` is as hard to implement efficiently as
`**`.
* add assertion on regex pattern
* Fix mypy
* Simplify glob_to_regex
* Inline the glob_to_regex helper function
Signed-off-by: Dan Callahan <danc@element.io >
* Moar comments
Signed-off-by: Dan Callahan <danc@element.io >
Co-authored-by: Dan Callahan <danc@element.io >
2021-05-11 11:47:23 +02:00
Erik Johnston
4df26abf28
Unpin attrs dep after new version has been released ( #9946 )
...
c.f. #9936
2021-05-07 12:57:21 +01:00
Erik Johnston
ac88aca7f7
1.33.1
v1.33.1
2021-05-06 14:06:38 +01:00
Erik Johnston
24f07a83e6
Pin attrs to <21.1.0 ( #9937 )
...
Fixes #9936
2021-05-06 14:06:06 +01:00
Brendan Abolivier
0644ac0989
1.33.0
v1.33.0
2021-05-05 14:15:54 +01:00
Dan Callahan
56c4b47df3
Build Debian packages for Ubuntu 21.04 Hirsute ( #9909 )
...
Signed-off-by: Dan Callahan <danc@element.io >
2021-04-30 15:36:05 +01:00
Andrew Morgan
d11f2dfee5
typo in changelog
v1.33.0rc2
2021-04-29 14:31:14 +01:00
Andrew Morgan
e9444cc74d
1.33.0rc2
2021-04-29 11:45:37 +01:00
Erik Johnston
e4ab8676b4
Fix tight loop handling presence replication. ( #9900 )
...
Only affects workers. Introduced in #9819 .
Fixes #9899 .
2021-04-28 14:42:50 +01:00
Andrew Morgan
8ba086980d
Reword account validity template change to sound less like a bugfix
v1.33.0rc1
2021-04-28 12:07:49 +01:00
Andrew Morgan
787de3190f
1.33.0rc1
2021-04-28 11:43:33 +01:00
Andrew Morgan
4e0fd35bc9
Revert "Experimental Federation Speedup ( #9702 )"
...
This reverts commit 05e8c70c05 .
2021-04-28 11:38:33 +01:00
Andrew Morgan
a5575ea3cf
Merge pull request #97 from matrix-org/anoa/dinsic_release_1_31_0
...
Merge Synapse release v1.31.0 into dinsic
2021-04-28 10:07:20 +01:00
Andrew Morgan
4d034f5389
Remove 3.6 old deps check
2021-04-27 19:01:41 +01:00
Andrew Morgan
fe604a022a
Remove various bits of compatibility code for Python <3.6 ( #9879 )
...
I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+.
2021-04-27 13:13:07 +01:00
Patrick Cloke
1350b053da
Pass errors back to the client when trying multiple federation destinations. ( #9868 )
...
This ensures that something like an auth error (403) will be
returned to the requester instead of attempting to try more
servers, which will likely result in the same error, and then
passing back a generic 400 error.
2021-04-27 07:30:34 -04:00
Erik Johnston
0ffa5fb935
Use current state table for presence.get_interested_remotes ( #9887 )
...
This should be a lot quicker than asking the state handler.
2021-04-27 10:09:41 +01:00
Richard van der Hoff
a0f5001155
unpin olddeps build from py36
2021-04-26 17:49:14 +01:00
Andrew Morgan
2e627ecc12
Remove spaces tests from Complement
2021-04-26 17:47:48 +01:00
Andrew Morgan
5706c8ba34
fix isort and mypy linting
2021-04-26 16:24:28 +01:00
Andrew Morgan
f95ec907c1
Remove old pin on mypy and mypy-zope
2021-04-26 15:08:56 +01:00
Andrew Morgan
1852e6ab6d
Re-sync synapse-dinsic buildkite pipeline with matrix-org/pipelines/synapse
2021-04-26 15:00:14 +01:00
Richard van der Hoff
3ff2251754
Improved validation for received requests ( #9817 )
...
* Simplify `start_listening` callpath
* Correctly check the size of uploaded files
2021-04-23 19:20:44 +01:00
Richard van der Hoff
84936e2264
Kill off _PushHTTPChannel. ( #9878 )
...
First of all, a fixup to `FakeChannel` which is needed to make it work with the default HTTP channel implementation.
Secondly, it looks like we no longer need `_PushHTTPChannel`, because as of #8013 , the producer that gets attached to the `HTTPChannel` is now an `IPushProducer`. This is good, because it means we can remove a whole load of test-specific boilerplate which causes variation between tests and production.
2021-04-23 18:40:57 +01:00
Andrew Morgan
292c80866f
Merge commit '1d8863c67' into anoa/dinsic_release_1_31_0
2021-04-23 18:25:46 +01:00
Andrew Morgan
69d83ca0f0
Merge commit '78e48f61b' into anoa/dinsic_release_1_31_0
2021-04-23 18:25:38 +01:00
Andrew Morgan
695b73c861
Allow OIDC cookies to work on non-root public baseurls ( #9726 )
...
Applied a (slightly modified) patch from https://github.com/matrix-org/synapse/issues/9574 .
As far as I understand this would allow the cookie set during the OIDC flow to work on deployments using public baseurls that do not sit at the URL path root.
2021-04-23 18:22:47 +01:00
Andrew Morgan
141eb2b503
Merge commit 'c6f8e8086' into anoa/dinsic_release_1_31_0
2021-04-23 18:14:57 +01:00
Andrew Morgan
5a8980f224
Merge commit '12d618471' into anoa/dinsic_release_1_31_0
2021-04-23 18:14:46 +01:00
Andrew Morgan
3d08c7e63b
Merge commit 'e5801db83' into anoa/dinsic_release_1_31_0
2021-04-23 18:14:38 +01:00
Andrew Morgan
cb6c2caf05
Merge commit 'c73cc2c2a' into anoa/dinsic_release_1_31_0
2021-04-23 18:14:20 +01:00
Andrew Morgan
2d95fa1e57
Merge commit '4ecba9bd5' into anoa/dinsic_release_1_31_0
2021-04-23 18:11:23 +01:00
Andrew Morgan
8c358933ec
Merge commit 'e2904f720' into anoa/dinsic_release_1_31_0
2021-04-23 17:52:01 +01:00
Andrew Morgan
67b2aa8b9f
Merge commit '0e3558473' into anoa/dinsic_release_1_31_0
2021-04-23 17:51:52 +01:00
Andrew Morgan
55dd2951d0
Merge commit 'cc324d53f' into anoa/dinsic_release_1_31_0
2021-04-23 17:49:34 +01:00