1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-06 16:06:52 +00:00
Commit graph

24496 commits

Author SHA1 Message Date
Quentin Gliech
048c1ac7f6
Support the new /auth_metadata endpoint defined in MSC2965. (#18093)
See the updated MSC2965

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-01-21 13:48:49 +01:00
Patrick Cloke
ca290d325c
Implement MSC4133 to support custom profile fields. (#17488)
Implementation of
[MSC4133](https://github.com/matrix-org/matrix-spec-proposals/pull/4133)
to support custom profile fields. It is behind an experimental flag and
includes tests.


### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-01-21 11:11:04 +00:00
Eric Eastwood
0a31cf18cd
Document possibility of configuring tls for a worker instance in instance_map (#18064) 2025-01-20 12:40:05 -06:00
Erik Johnston
48db0c2d6c
Drop indices concurrently on background updates (#18091)
Otherwise these can race with other long running queries and lock out
all other queries.

This caused problems in v1.22.0 as we added an index to `events` table
in #17948, but that got interrupted and so next time we ran the
background update we needed to delete the half-finished index. However,
that got blocked behind some long running queries and then locked other
queries out (stopping workers from even starting).
2025-01-20 17:14:06 +00:00
dependabot[bot]
24c4d82aeb
Bump pyo3 from 0.23.3 to 0.23.4 (#18079) 2025-01-16 14:18:06 +00:00
dependabot[bot]
3fda8d3b67
Bump serde_json from 1.0.134 to 1.0.135 (#18081) 2025-01-16 14:15:01 +00:00
dependabot[bot]
5f15a549d7
Bump ulid from 1.1.3 to 1.1.4 (#18080) 2025-01-16 14:14:46 +00:00
dependabot[bot]
6cefbc6852
Bump mypy from 1.12.1 to 1.13.0 (#18083) 2025-01-16 10:17:58 +00:00
dependabot[bot]
fd3ec6435e
Bump pillow from 11.0.0 to 11.1.0 (#18084) 2025-01-16 10:17:46 +00:00
Andrew Morgan
39bd6e2c16 Merge branch 'master' into develop 2025-01-14 15:41:08 +00:00
Andrew Morgan
5c736cd2af move additional release missed in last commit 2025-01-14 14:23:35 +00:00
Andrew Morgan
e70e8d132c Move 2023/4 changelog entries under docs/changelogs 2025-01-14 14:20:08 +00:00
Andrew Morgan
48334fbc40 move postgres changelog to the top 2025-01-14 14:17:55 +00:00
Andrew Morgan
b4fd694ce3 1.122.0 2025-01-14 14:14:23 +00:00
Eric Eastwood
e2d757f62d
Increase rc_invites.per_issuer for Complement (#18072)
It's possible to run into `SynapseError: 429 - Too Many Requests (rc_invites.per_issuer)`

`rc_invites.per_issuer` originally introduced in
https://github.com/matrix-org/synapse/pull/13125
2025-01-13 15:01:00 -06:00
Eric Eastwood
aab3672037
Bust _membership_stream_cache cache when current state changes (#17732)
This is particularly a problem in a state reset scenario where the membership
might change without a corresponding event.

This PR is targeting a scenario where a state reset happens which causes
room membership to change. Previously, the cache would just hold onto
stale data and now we properly bust the cache in this scenario.

We have a few tests for these scenarios which you can see are now fixed
because we can remove the `FIXME` where we were previously manually
busting the cache in the test itself.

This is a general Synapse thing so by it's nature it helps out Sliding
Sync.

Fix https://github.com/element-hq/synapse/issues/17368

Prerequisite for https://github.com/element-hq/synapse/issues/17929

---

Match when are busting `_curr_state_delta_stream_cache`
2025-01-08 10:11:09 -06:00
dependabot[bot]
d0677dca39
Bump jinja2 from 3.1.4 to 3.1.5 (#18067) 2025-01-08 16:08:43 +00:00
Shay
e34fd1228d
Add the ability to filter by state event type on admin room state endpoint (#18035)
Adds a query param `type` to `/_synapse/admin/v1/rooms/{room_id}/state`
that filters the state event query by state event type.

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2025-01-08 15:38:26 +00:00
Travis Ralston
beea39f000
Drop unstable MSC4151 implementation (#18052)
It's been rotated out of known clients, and should be safe for removal
now.

Fixes https://github.com/element-hq/synapse/issues/17373

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2025-01-07 15:45:57 -07:00
Olivier 'reivilibre
fa320c4fcb Fix typographical error in changelog 2025-01-07 17:43:41 +00:00
Olivier 'reivilibre
22c2add9c0 Merge branch 'release-v1.122' into develop 2025-01-07 17:42:44 +00:00
dependabot[bot]
60f596b4d8
Bump pyopenssl from 24.2.1 to 24.3.0 (#18062)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 16:50:50 +00:00
Olivier 'reivilibre
1143e14479 Tweak changelog 2025-01-07 15:20:24 +00:00
Olivier 'reivilibre
c199ede287 1.122.0rc1 2025-01-07 14:13:02 +00:00
dependabot[bot]
9fb7333a7c
Bump sentry-sdk from 2.17.0 to 2.19.2 (#18061)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-06 18:27:05 +00:00
dependabot[bot]
a0a4a36891
Bump pyicu from 2.13.1 to 2.14 (#18060) 2025-01-06 18:24:49 +00:00
dependabot[bot]
49fcda31f6
Bump serde from 1.0.216 to 1.0.217 (#18059) 2025-01-06 18:23:12 +00:00
Mathieu Velten
b3ba501c52
Properly purge state groups tables when purging a room (#18024)
Currently purging a complex room can lead to a lot of orphaned rows left
behind in the state groups tables.
It seems it is because we are loosing track of state groups sometimes.

This change uses the `room_id` indexed column of `state_groups` table to
decide what to delete instead of doing an indirection through
`event_to_state_groups`.

Related to https://github.com/element-hq/synapse/issues/3364.

### Pull Request Checklist

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

---------

Co-authored-by: Erik Johnston <erikj@jki.re>
2025-01-06 15:32:18 +00:00
Patrick Cloke
6306de8e16
Refactor get_profile: do not return missing fields. (#18063)
Refactor `get_profile` to avoid returning "empty" (`None` / `null`)
fields. Currently this is not very important, but will be more useful
once #17488 lands. It does update the servlet to use this now which has
a minor change in behavior: additional fields served over federation
will now be properly sent back to clients.

It also adds constants for `avatar_url` / `displayname` although I did
not attempt to use it everywhere possible.
2025-01-03 17:23:29 +00:00
Shay
b5267678d2
Add a test to verify remote user messages can be redacted via admin api redaction endpoint if requester is admin in room (#18043) 2025-01-03 12:52:42 +00:00
dependabot[bot]
ebc21a8c67
Bump twine from 5.1.1 to 6.0.1 (#18049)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 15:09:51 +00:00
dependabot[bot]
e5a53819fc
Bump mypy-zope from 1.0.8 to 1.0.9 (#18047) 2024-12-23 15:03:55 +00:00
dependabot[bot]
66b24d3d00
Bump anyhow from 1.0.94 to 1.0.95 (#18045) 2024-12-23 15:03:10 +00:00
dependabot[bot]
2b59e738ee
Bump authlib from 1.3.2 to 1.4.0 (#18048)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 14:57:22 +00:00
dependabot[bot]
b1d030a107
Bump serde_json from 1.0.133 to 1.0.134 (#18044) 2024-12-23 14:52:41 +00:00
morguldir
7c2284b2f2
Make admin api redactions use the requester to send the redaction (#18029) 2024-12-23 11:19:35 +00:00
Colin Watson
d69c00b5a1
Stop using twisted.internet.defer.returnValue (#18020)
`defer.returnValue` was only needed in Python 2; in Python 3, a simple
`return` is fine.

`twisted.internet.defer.returnValue` is deprecated as of Twisted 24.7.0.

Most uses of `returnValue` in synapse were removed a while back; this
cleans up some remaining bits.
2024-12-20 10:57:59 +00:00
Patrick Cloke
2d23250da7
Remove support for PostgreSQL 11 and 12 (#18034)
This is essentially matrix-org/synapse#14392. I didn't see anything in
there about updating sytest or complement.

The main driver of this is so that I can use `jsonb_path_exists` in
#17488. 😄
2024-12-19 17:02:47 +00:00
Mathieu Velten
234d07eb09
Disable statement timeout during room purge (#18017)
This is already done for `purge_history` but seems to have been
forgotten for `purge_room`.
2024-12-19 14:02:06 +00:00
Eric Eastwood
bd9a1079bc
Update reverse proxy docs with what we've learned from #17986 (#17994)
Update reverse proxy docs with what we've learned from
https://github.com/element-hq/synapse/pull/17986

Also vice versa and update our nginx config with what I learned from the
reverse proxy docs.

### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
The entry should:
- Be a short description of your change which makes sense to users.
"Fixed a bug that prevented receiving messages from other servers."
instead of "Moved X method from `EventStore` to `EventWorkerStore`.".
  - Use markdown where necessary, mostly for `code blocks`.
  - End with either a period (.) or an exclamation mark (!).
  - Start with a capital letter.
- Feel free to credit yourself, by adding a sentence "Contributed by
@github_username." or "Contributed by [Your Name]." to the end of the
entry.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-12-19 14:00:50 +00:00
Andrew Morgan
3eb92369ca
Fix mypy errors on Twisted 24.11.0 (#17998)
Fixes various `mypy` errors associated with Twisted `24.11.0`.

Hopefully addresses https://github.com/element-hq/synapse/issues/17075,
though I've yet to test against `trunk`.

Changes should be compatible with our currently pinned Twisted version
of `24.7.0`.
2024-12-18 11:49:38 +00:00
Andrew Morgan
09f377fa52
Wording improvements for the TaskScheduler (#17992)
As I found the current docstrings a bit unclear while trying to wrap my
head around this class.
2024-12-18 11:42:34 +00:00
Andrew Morgan
f1b0f9a4ef
Bump mypy from 1.11.2 to 1.12.1 and fix new typechecking errors (#17999)
Supersedes https://github.com/element-hq/synapse/pull/17958.

Awkwardly, the changes made to fix the mypy errors in 1.12.1 cause
errors in 1.11.2. So you'll need to update your mypy version to 1.12.1
to eliminate typechecking errors during developing.
2024-12-18 11:42:17 +00:00
cynhr
f1ecf46647
Add email.tlsname config option (#17849)
The existing `email.smtp_host` config option is used for two distinct
purposes: it is resolved into the IP address to connect to, and used to
(request via SNI and) validate the server's certificate if TLS is
enabled. This new option allows specifying a different name for the
second purpose.

This is especially helpful, if `email.smtp_host` isn't a global FQDN,
but something that resolves only locally (e.g. "localhost" to connect
through the loopback interface, or some other internally routed name),
that one cannot get a valid certificate for.
Alternatives would of course be to specify a global FQDN as
`email.smtp_host`, or to disable TLS entirely, both of which might be
undesirable, depending on the SMTP server configuration.
2024-12-17 18:05:38 -06:00
V02460
57bf44941e
Add macaroon_secret_key_path config option (#17983)
Another config option on my quest to a `*_path` variant for every
secret. This time it’s `macaroon_secret_key_path`.

Reading secrets from files has the security advantage of separating the secrets from the config. It also simplifies secrets management in Kubernetes. Also useful to NixOS users.
2024-12-16 18:01:33 -06:00
Travis Ralston
3d60a58ad6
Add last_seen_ts to query user example (#17976)
This section could probably do with a lot more editorial attention, but
for now this is all there is in terms of documentation. The field is
already returned by Synapse:
4587decd67/synapse/handlers/admin.py (L150)

`last_seen_ts` was introduced in
https://github.com/matrix-org/synapse/pull/16218
2024-12-16 17:12:40 -06:00
Shay
8208186e3c
Add some useful endpoints to Admin API (#17948)
- Fetch the number of invites the provided user has sent after a given
timestamp
- Fetch the number of rooms the provided user has joined after a given
timestamp, regardless if they have left/been banned from the rooms
subsequently
- Get report IDs of event reports where the provided user was the sender
of the reported event
2024-12-16 13:27:34 -06:00
dependabot[bot]
29d586311d
Bump http from 1.1.0 to 1.2.0 (#18013) 2024-12-16 13:23:11 +00:00
dependabot[bot]
512c9efcb3
Bump serde from 1.0.215 to 1.0.216 (#18031) 2024-12-16 12:20:16 +00:00
dependabot[bot]
35c361c0d9
Bump pillow from 10.4.0 to 11.0.0 (#18015) 2024-12-16 12:19:09 +00:00