Skip to content

Commit fc2cbb2

Browse files
committed
Merge tag 'v1.56.0' into beeper-master
Synapse 1.56.0 (2022-04-05) =========================== Synapse will now refuse to start up if open registration is enabled, in order to help mitigate abuse across the federation. If you would like to provide registration to anyone, consider adding [email](https://github.com/matrix-org/synapse/blob/8a519f8abc6de772167c2cca101d22ee2052fafc/docs/sample_config.yaml#L1285), [recaptcha](https://matrix-org.github.io/synapse/v1.56/CAPTCHA_SETUP.html) or [token-based](https://matrix-org.github.io/synapse/v1.56/usage/administration/admin_api/registration_tokens.html) verification in order to prevent automated registration from bad actors. This check can be disabled by setting the `enable_registration_without_verification` option in your homeserver configuration file to `true`. More details are available in the [upgrade notes](https://matrix-org.github.io/synapse/v1.56/upgrade.html#open-registration-without-verification-is-now-disabled-by-default). Synapse will additionally now refuse to start when using PostgreSQL with a non-`C` values for `COLLATE` and `CTYPE`, unless the config flag `allow_unsafe_locale`, found in the database section of the configuration file, is set to `true`. See the [upgrade notes](https://matrix-org.github.io/synapse/v1.56/upgrade#change-in-behaviour-for-postgresql-databases-with-unsafe-locale) for details. Internal Changes ---------------- - Bump the version of `black` for compatibility with the latest `click` release. ([\matrix-org#12320](matrix-org#12320)) Synapse 1.56.0rc1 (2022-03-29) ============================== Features -------- - Allow modules to store already existing 3PID associations. ([\matrix-org#12195](matrix-org#12195)) - Allow registering server administrators using the module API. Contributed by Famedly. ([\matrix-org#12250](matrix-org#12250)) Bugfixes -------- - Fix a long-standing bug which caused the `/_matrix/federation/v1/state` and `/_matrix/federation/v1/state_ids` endpoints to return incorrect or invalid data when called for an event which we have stored as an "outlier". ([\matrix-org#12087](matrix-org#12087)) - Fix a long-standing bug where events from ignored users would still be considered for relations. ([\matrix-org#12227](matrix-org#12227), [\matrix-org#12232](matrix-org#12232), [\matrix-org#12285](matrix-org#12285)) - Fix a bug introduced in Synapse 1.53.0 where an unnecessary query could be performed when fetching bundled aggregations for threads. ([\matrix-org#12228](matrix-org#12228)) - Fix a bug introduced in Synapse 1.52.0 where admins could not deactivate and GDPR-erase a user if Synapse was configured with limits on avatars. ([\matrix-org#12261](matrix-org#12261)) Improved Documentation ---------------------- - Fix the link to the module documentation in the legacy spam checker warning message. ([\matrix-org#12231](matrix-org#12231)) - Remove incorrect prefixes in the worker documentation for some endpoints. ([\matrix-org#12243](matrix-org#12243)) - Correct `check_username_for_spam` annotations and docs. ([\matrix-org#12246](matrix-org#12246)) - Correct Authentik OpenID typo, and add notes on troubleshooting. Contributed by @IronTooch. ([\matrix-org#12275](matrix-org#12275)) - HAProxy reverse proxy guide update to stop sending IPv4-mapped address to homeserver. Contributed by @villepeh. ([\matrix-org#12279](matrix-org#12279)) Internal Changes ---------------- - Rename `shared_rooms` to `mutual_rooms` ([MSC2666](matrix-org/matrix-spec-proposals#2666)), as per proposal changes. ([\matrix-org#12036](matrix-org#12036)) - Remove check on `update_user_directory` for shared rooms handler ([MSC2666](matrix-org/matrix-spec-proposals#2666)), and update/expand documentation. ([\matrix-org#12038](matrix-org#12038)) - Refactor `create_new_client_event` to use a new parameter, `state_event_ids`, which accurately describes the usage with [MSC2716](matrix-org/matrix-spec-proposals#2716) instead of abusing `auth_event_ids`. ([\matrix-org#12083](matrix-org#12083), [\matrix-org#12304](matrix-org#12304)) - Refuse to start if registration is enabled without email, captcha, or token-based verification unless the new config flag `enable_registration_without_verification` is set to `true`. ([\matrix-org#12091](matrix-org#12091), [\matrix-org#12322](matrix-org#12322)) - Add tests for database transaction callbacks. ([\matrix-org#12198](matrix-org#12198)) - Handle cancellation in `DatabasePool.runInteraction`. ([\matrix-org#12199](matrix-org#12199)) - Add missing type hints for cache storage. ([\matrix-org#12216](matrix-org#12216)) - Add missing type hints for storage. ([\matrix-org#12248](matrix-org#12248), [\matrix-org#12255](matrix-org#12255)) - Add type hints to tests files. ([\matrix-org#12224](matrix-org#12224), [\matrix-org#12240](matrix-org#12240), [\matrix-org#12256](matrix-org#12256)) - Use type stubs for `psycopg2`. ([\matrix-org#12269](matrix-org#12269)) - Improve type annotations for `execute_values`. ([\matrix-org#12311](matrix-org#12311)) - Clean-up logic around rebasing URLs for URL image previews. ([\matrix-org#12219](matrix-org#12219)) - Use the `ignored_users` table in additional places instead of re-parsing the account data. ([\matrix-org#12225](matrix-org#12225)) - Refactor the relations endpoints to add a `RelationsHandler`. ([\matrix-org#12237](matrix-org#12237)) - Generate announcement links in the release script. ([\matrix-org#12242](matrix-org#12242)) - Improve error message when dependencies check finds a broken installation. ([\matrix-org#12244](matrix-org#12244)) - Compress metrics HTTP resource when enabled. Contributed by Nick @ Beeper. ([\matrix-org#12258](matrix-org#12258)) - Refuse to start if the PostgreSQL database has a non-`C` locale, unless the config flag `allow_unsafe_db_locale` is set to true. ([\matrix-org#12262](matrix-org#12262), [\matrix-org#12288](matrix-org#12288)) - Optionally include account validity expiration information to experimental [MSC3720](matrix-org/matrix-spec-proposals#3720) account status responses. ([\matrix-org#12266](matrix-org#12266)) - Add a new cache `_get_membership_from_event_id` to speed up push rule calculations in large rooms. ([\matrix-org#12272](matrix-org#12272)) - Re-enable Complement concurrency in CI. ([\matrix-org#12283](matrix-org#12283)) - Remove unused test utilities. ([\matrix-org#12291](matrix-org#12291)) - Enhance logging for inbound federation events. ([\matrix-org#12301](matrix-org#12301)) - Fix compatibility with the recently-released Jinja 3.1. ([\matrix-org#12313](matrix-org#12313)) - Avoid trying to calculate the state at outlier events. ([\matrix-org#12314](matrix-org#12314))
2 parents 8f3838d + ac80bfb commit fc2cbb2

File tree

107 files changed

+6643
-5734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+6643
-5734
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ jobs:
377377
# Run Complement
378378
- run: |
379379
set -o pipefail
380-
go test -v -json -p 1 -tags synapse_blacklist,msc2403,msc2716,msc3030 ./tests/... 2>&1 | gotestfmt
380+
go test -v -json -tags synapse_blacklist,msc2403,msc2716,msc3030 ./tests/... 2>&1 | gotestfmt
381381
shell: bash
382382
name: Run Complement Tests
383383
env:

CHANGES-pre-1.0.md

Lines changed: 3640 additions & 0 deletions
Large diffs are not rendered by default.

CHANGES.md

Lines changed: 84 additions & 3641 deletions
Large diffs are not rendered by default.

contrib/jitsimeetbridge/jitsimeetbridge.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,15 @@ def advertiseSsrcs(self):
193193
time.sleep(7)
194194
print("SSRC spammer started")
195195
while self.running:
196-
ssrcMsg = "<presence to='%(tojid)s' xmlns='jabber:client'><x xmlns='http://jabber.org/protocol/muc'/><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://jitsi.org/jitsimeet' ver='0WkSdhFnAUxrz4ImQQLdB80GFlE='/><nick xmlns='http://jabber.org/protocol/nick'>%(nick)s</nick><stats xmlns='http://jitsi.org/jitmeet/stats'><stat name='bitrate_download' value='175'/><stat name='bitrate_upload' value='176'/><stat name='packetLoss_total' value='0'/><stat name='packetLoss_download' value='0'/><stat name='packetLoss_upload' value='0'/></stats><media xmlns='http://estos.de/ns/mjs'><source type='audio' ssrc='%(assrc)s' direction='sendre'/><source type='video' ssrc='%(vssrc)s' direction='sendre'/></media></presence>" % {
197-
"tojid": "%s@%s/%s" % (ROOMNAME, ROOMDOMAIN, self.shortJid),
198-
"nick": self.userId,
199-
"assrc": self.ssrcs["audio"],
200-
"vssrc": self.ssrcs["video"],
201-
}
196+
ssrcMsg = (
197+
"<presence to='%(tojid)s' xmlns='jabber:client'><x xmlns='http://jabber.org/protocol/muc'/><c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://jitsi.org/jitsimeet' ver='0WkSdhFnAUxrz4ImQQLdB80GFlE='/><nick xmlns='http://jabber.org/protocol/nick'>%(nick)s</nick><stats xmlns='http://jitsi.org/jitmeet/stats'><stat name='bitrate_download' value='175'/><stat name='bitrate_upload' value='176'/><stat name='packetLoss_total' value='0'/><stat name='packetLoss_download' value='0'/><stat name='packetLoss_upload' value='0'/></stats><media xmlns='http://estos.de/ns/mjs'><source type='audio' ssrc='%(assrc)s' direction='sendre'/><source type='video' ssrc='%(vssrc)s' direction='sendre'/></media></presence>"
198+
% {
199+
"tojid": "%s@%s/%s" % (ROOMNAME, ROOMDOMAIN, self.shortJid),
200+
"nick": self.userId,
201+
"assrc": self.ssrcs["audio"],
202+
"vssrc": self.ssrcs["video"],
203+
}
204+
)
202205
res = self.sendIq(ssrcMsg)
203206
print("reply from ssrc announce: ", res)
204207
time.sleep(10)

debian/changelog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
matrix-synapse-py3 (1.56.0) stable; urgency=medium
2+
3+
* New synapse release 1.56.0.
4+
5+
-- Synapse Packaging team <[email protected]> Tue, 05 Apr 2022 12:38:39 +0100
6+
7+
matrix-synapse-py3 (1.56.0~rc1) stable; urgency=medium
8+
9+
* New synapse release 1.56.0~rc1.
10+
11+
-- Synapse Packaging team <[email protected]> Tue, 29 Mar 2022 10:40:50 +0100
12+
113
matrix-synapse-py3 (1.55.2) stable; urgency=medium
214

315
* New synapse release 1.55.2.

demo/start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ for port in 8080 8081 8082; do
3838
printf '\n\n# Customisation made by demo/start.sh\n\n'
3939
echo "public_baseurl: http://localhost:$port/"
4040
echo 'enable_registration: true'
41+
echo 'enable_registration_without_verification: true'
4142
echo ''
4243

4344
# Warning, this heredoc depends on the interaction of tabs and spaces.

docs/modules/spam_checker_callbacks.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ any of the subsequent implementations of this callback.
172172
_First introduced in Synapse v1.37.0_
173173

174174
```python
175-
async def check_username_for_spam(user_profile: Dict[str, str]) -> bool
175+
async def check_username_for_spam(user_profile: synapse.module_api.UserProfile) -> bool
176176
```
177177

178178
Called when computing search results in the user directory. The module must return a
@@ -182,9 +182,11 @@ search results; otherwise return `False`.
182182

183183
The profile is represented as a dictionary with the following keys:
184184

185-
* `user_id`: The Matrix ID for this user.
186-
* `display_name`: The user's display name.
187-
* `avatar_url`: The `mxc://` URL to the user's avatar.
185+
* `user_id: str`. The Matrix ID for this user.
186+
* `display_name: Optional[str]`. The user's display name, or `None` if this user
187+
has not set a display name.
188+
* `avatar_url: Optional[str]`. The `mxc://` URL to the user's avatar, or `None`
189+
if this user has not set an avatar.
188190

189191
The module is given a copy of the original dictionary, so modifying it from within the
190192
module cannot modify a user's profile when included in user directory search results.

docs/openid.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ oidc_providers:
225225
3. Create an application for synapse in Authentik and link it to the provider.
226226
4. Note the slug of your application, Client ID and Client Secret.
227227

228+
Note: RSA keys must be used for signing for Authentik, ECC keys do not work.
229+
228230
Synapse config:
229231
```yaml
230232
oidc_providers:
@@ -240,7 +242,7 @@ oidc_providers:
240242
- "email"
241243
user_mapping_provider:
242244
config:
243-
localpart_template: "{{ user.preferred_username }}}"
245+
localpart_template: "{{ user.preferred_username }}"
244246
display_name_template: "{{ user.preferred_username|capitalize }}" # TO BE FILLED: If your users have names in Authentik and you want those in Synapse, this should be replaced with user.name|capitalize.
245247
```
246248

docs/postgres.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,13 @@ host all all ::1/128 ident
234234
### Fixing incorrect `COLLATE` or `CTYPE`
235235
236236
Synapse will refuse to set up a new database if it has the wrong values of
237-
`COLLATE` and `CTYPE` set, and will log warnings on existing databases. Using
238-
different locales can cause issues if the locale library is updated from
237+
`COLLATE` and `CTYPE` set. Synapse will also refuse to start an existing database with incorrect values
238+
of `COLLATE` and `CTYPE` unless the config flag `allow_unsafe_locale`, found in the
239+
`database` section of the config, is set to true. Using different locales can cause issues if the locale library is updated from
239240
underneath the database, or if a different version of the locale is used on any
240241
replicas.
241242
242-
The safest way to fix the issue is to dump the database and recreate it with
243+
If you have a databse with an unsafe locale, the safest way to fix the issue is to dump the database and recreate it with
243244
the correct locale parameter (as shown above). It is also possible to change the
244245
parameters on a live database and run a `REINDEX` on the entire database,
245246
however extreme care must be taken to avoid database corruption.

docs/reverse_proxy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ matrix.example.com {
182182

183183
```
184184
frontend https
185-
bind :::443 v4v6 ssl crt /etc/ssl/haproxy/ strict-sni alpn h2,http/1.1
185+
bind *:443,[::]:443 ssl crt /etc/ssl/haproxy/ strict-sni alpn h2,http/1.1
186186
http-request set-header X-Forwarded-Proto https if { ssl_fc }
187187
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
188188
http-request set-header X-Forwarded-For %[src]
@@ -195,7 +195,7 @@ frontend https
195195
use_backend matrix if matrix-host matrix-path
196196
197197
frontend matrix-federation
198-
bind :::8448 v4v6 ssl crt /etc/ssl/haproxy/synapse.pem alpn h2,http/1.1
198+
bind *:8448,[::]:8448 ssl crt /etc/ssl/haproxy/synapse.pem alpn h2,http/1.1
199199
http-request set-header X-Forwarded-Proto https if { ssl_fc }
200200
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
201201
http-request set-header X-Forwarded-For %[src]

0 commit comments

Comments
 (0)