Skip to content

Commit 635426a

Browse files
committed
Merge tag 'v1.87.0' into develop
Please note that this will be the last release of Synapse that is compatible with Python 3.7 and earlier. This is due to Python 3.7 now having reached End of Life; see our [deprecation policy](https://matrix-org.github.io/synapse/v1.87/deprecation_policy.html) for more details. - Pin `pydantic` to `^1.7.4` to avoid backwards-incompatible API changes from the 2.0.0 release. Resolves matrix-org#15858. Contributed by @PaarthShah. ([\matrix-org#15862](matrix-org#15862)) - Split out 2022 changes from the changelog so the rendered version in GitHub doesn't timeout as much. ([\matrix-org#15846](matrix-org#15846)) - Improve `/messages` response time by avoiding backfill when we already have messages to return. ([\matrix-org#15737](matrix-org#15737)) - Add spam checker module API for logins. ([\matrix-org#15838](matrix-org#15838)) - Fix a long-standing bug where media files were served in an unsafe manner. Contributed by @joshqou. ([\matrix-org#15680](matrix-org#15680)) - Avoid invalidating a cache that was just prefilled. ([\matrix-org#15758](matrix-org#15758)) - Fix requesting multiple keys at once over federation, related to [MSC3983](matrix-org/matrix-spec-proposals#3983). ([\matrix-org#15770](matrix-org#15770)) - Fix joining rooms through aliases where the alias server isn't a real homeserver. Contributed by @tulir @ Beeper. ([\matrix-org#15776](matrix-org#15776)) - Fix a bug in push rules handling leading to an invalid (per spec) `is_user_mention` rule sent to clients. Also fix wrong rule names for `is_user_mention` and `is_room_mention`. ([\matrix-org#15781](matrix-org#15781)) - Fix a bug introduced in 1.57.0 where the wrong table would be locked on updating database rows when using SQLite as the database backend. ([\matrix-org#15788](matrix-org#15788)) - Fix Sytest environmental variable evaluation in CI. ([\matrix-org#15804](matrix-org#15804)) - Fix forgotten rooms missing from initial sync after rejoining them. Contributed by Nico from Famedly. ([\matrix-org#15815](matrix-org#15815)) - Fix sqlite `user_filters` upgrade introduced in v1.86.0. ([\matrix-org#15817](matrix-org#15817)) - Document `looping_call()` functionality that will wait for the given function to finish before scheduling another. ([\matrix-org#15772](matrix-org#15772)) - Fix a typo in the [Admin API](https://matrix-org.github.io/synapse/latest/usage/administration/admin_api/index.html). ([\matrix-org#15805](matrix-org#15805)) - Fix typo in MSC number in faster remote room join architecture doc. ([\matrix-org#15812](matrix-org#15812)) - Remove experimental [MSC2716](matrix-org/matrix-spec-proposals#2716) implementation to incrementally import history into existing rooms. ([\matrix-org#15748](matrix-org#15748)) - Replace `EventContext` fields `prev_group` and `delta_ids` with field `state_group_deltas`. ([\matrix-org#15233](matrix-org#15233)) - Regularly try to send transactions to other servers after they failed instead of waiting for a new event to be available before trying. ([\matrix-org#15743](matrix-org#15743)) - Fix requesting multiple keys at once over federation, related to [MSC3983](matrix-org/matrix-spec-proposals#3983). ([\matrix-org#15755](matrix-org#15755)) - Allow for the configuration of max request retries and min/max retry delays in the matrix federation client. ([\matrix-org#15783](matrix-org#15783)) - Switch from `matrix://` to `matrix-federation://` scheme for internal Synapse routing of outbound federation traffic. ([\matrix-org#15806](matrix-org#15806)) - Fix harmless exceptions being printed when running the port DB script. ([\matrix-org#15814](matrix-org#15814)) * Bump attrs from 22.2.0 to 23.1.0. ([\matrix-org#15801](matrix-org#15801)) * Bump cryptography from 40.0.2 to 41.0.1. ([\matrix-org#15800](matrix-org#15800)) * Bump ijson from 3.2.0.post0 to 3.2.1. ([\matrix-org#15802](matrix-org#15802)) * Bump phonenumbers from 8.13.13 to 8.13.14. ([\matrix-org#15798](matrix-org#15798)) * Bump ruff from 0.0.265 to 0.0.272. ([\matrix-org#15799](matrix-org#15799)) * Bump ruff from 0.0.272 to 0.0.275. ([\matrix-org#15833](matrix-org#15833)) * Bump serde_json from 1.0.96 to 1.0.97. ([\matrix-org#15797](matrix-org#15797)) * Bump serde_json from 1.0.97 to 1.0.99. ([\matrix-org#15832](matrix-org#15832)) * Bump towncrier from 22.12.0 to 23.6.0. ([\matrix-org#15831](matrix-org#15831)) * Bump types-opentracing from 2.4.10.4 to 2.4.10.5. ([\matrix-org#15830](matrix-org#15830)) * Bump types-setuptools from 67.8.0.0 to 68.0.0.0. ([\matrix-org#15835](matrix-org#15835))
2 parents 39ae63d + 1294d10 commit 635426a

File tree

77 files changed

+4085
-5272
lines changed

Some content is hidden

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

77 files changed

+4085
-5272
lines changed

CHANGES.md

Lines changed: 70 additions & 2764 deletions
Large diffs are not rendered by default.

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/lnav/synapse-log-format.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"level": "error"
3030
},
3131
{
32-
"line": "my-matrix-server-federation-sender-1 | 2023-01-25 20:56:20,995 - synapse.http.matrixfederationclient - 709 - WARNING - federation_transaction_transmission_loop-3 - {PUT-O-3} [example.com] Request failed: PUT matrix://example.com/_matrix/federation/v1/send/1674680155797: HttpResponseException('403: Forbidden')",
32+
"line": "my-matrix-server-federation-sender-1 | 2023-01-25 20:56:20,995 - synapse.http.matrixfederationclient - 709 - WARNING - federation_transaction_transmission_loop-3 - {PUT-O-3} [example.com] Request failed: PUT matrix-federation://example.com/_matrix/federation/v1/send/1674680155797: HttpResponseException('403: Forbidden')",
3333
"level": "warning"
3434
},
3535
{

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.87.0) stable; urgency=medium
2+
3+
* New Synapse release 1.87.0.
4+
5+
-- Synapse Packaging team <[email protected]> Tue, 04 Jul 2023 16:24:00 +0100
6+
7+
matrix-synapse-py3 (1.87.0~rc1) stable; urgency=medium
8+
9+
* New synapse release 1.87.0rc1.
10+
11+
-- Synapse Packaging team <[email protected]> Tue, 27 Jun 2023 15:27:04 +0000
12+
113
matrix-synapse-py3 (1.86.0) stable; urgency=medium
214

315
* New Synapse release 1.86.0.

docker/complement/conf/workers-shared-extra.yaml.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ allow_device_name_lookup_over_federation: true
9292
## Experimental Features ##
9393

9494
experimental_features:
95-
# Enable history backfilling support
96-
msc2716_enabled: true
9795
# client-side support for partial state in /send_join responses
9896
faster_joins: true
9997
# Enable support for polls

docker/configure_workers_and_start.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@
244244
"^/_matrix/client/(api/v1|r0|v3|unstable)/join/",
245245
"^/_matrix/client/(api/v1|r0|v3|unstable)/knock/",
246246
"^/_matrix/client/(api/v1|r0|v3|unstable)/profile/",
247-
"^/_matrix/client/(v1|unstable/org.matrix.msc2716)/rooms/.*/batch_send",
248247
],
249248
"shared_extra_conf": {},
250249
"worker_extra_conf": "",

docs/admin_api/rooms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ The following query parameters are available:
419419

420420
* `from` (required) - The token to start returning events from. This token can be obtained from a prev_batch
421421
or next_batch token returned by the /sync endpoint, or from an end token returned by a previous request to this endpoint.
422-
* `to` - The token to spot returning events at.
422+
* `to` - The token to stop returning events at.
423423
* `limit` - The maximum number of events to return. Defaults to `10`.
424424
* `filter` - A JSON RoomEventFilter to filter returned events with.
425425
* `dir` - The direction to return events from. Either `f` for forwards or `b` for backwards. Setting

docs/changelogs/CHANGES-2022.md

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

docs/development/synapse_architecture/faster_joins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is a work-in-progress set of notes with two goals:
66

77
See also [MSC3902](https://github.com/matrix-org/matrix-spec-proposals/pull/3902).
88

9-
The key idea is described by [MSC706](https://github.com/matrix-org/matrix-spec-proposals/pull/3902). This allows servers to
9+
The key idea is described by [MSC3706](https://github.com/matrix-org/matrix-spec-proposals/pull/3706). This allows servers to
1010
request a lightweight response to the federation `/send_join` endpoint.
1111
This is called a **faster join**, also known as a **partial join**. In these
1212
notes we'll usually use the word "partial" as it matches the database schema.

docs/modules/spam_checker_callbacks.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,42 @@ callback returns `False`, Synapse falls through to the next one. The value of th
348348
callback that does not return `False` will be used. If this happens, Synapse will not call
349349
any of the subsequent implementations of this callback.
350350

351+
352+
### `check_login_for_spam`
353+
354+
_First introduced in Synapse v1.87.0_
355+
356+
```python
357+
async def check_login_for_spam(
358+
user_id: str,
359+
device_id: Optional[str],
360+
initial_display_name: Optional[str],
361+
request_info: Collection[Tuple[Optional[str], str]],
362+
auth_provider_id: Optional[str] = None,
363+
) -> Union["synapse.module_api.NOT_SPAM", "synapse.module_api.errors.Codes"]
364+
```
365+
366+
Called when a user logs in.
367+
368+
The arguments passed to this callback are:
369+
370+
* `user_id`: The user ID the user is logging in with
371+
* `device_id`: The device ID the user is re-logging into.
372+
* `initial_display_name`: The device display name, if any.
373+
* `request_info`: A collection of tuples, which first item is a user agent, and which
374+
second item is an IP address. These user agents and IP addresses are the ones that were
375+
used during the login process.
376+
* `auth_provider_id`: The identifier of the SSO authentication provider, if any.
377+
378+
If multiple modules implement this callback, they will be considered in order. If a
379+
callback returns `synapse.module_api.NOT_SPAM`, Synapse falls through to the next one.
380+
The value of the first callback that does not return `synapse.module_api.NOT_SPAM` will
381+
be used. If this happens, Synapse will not call any of the subsequent implementations of
382+
this callback.
383+
384+
*Note:* This will not be called when a user registers.
385+
386+
351387
## Example
352388

353389
The example below is a module that implements the spam checker callback

0 commit comments

Comments
 (0)