Commit Graph

24487 Commits

Author SHA1 Message Date
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
dependabot[bot] 95853c5f31
Bump pydantic from 2.9.2 to 2.10.3 (#18014) 2024-12-16 12:03:42 +00:00
dependabot[bot] eb019c03c4
Bump anyhow from 1.0.93 to 1.0.94 (#18012) 2024-12-16 11:58:34 +00:00
Wilson eedab12e6d
forward requester id to check username for spam callbacks (#17916) 2024-12-13 14:17:41 +00:00
Andrew Morgan 483602efb2 Merge branch 'master' into develop 2024-12-11 19:24:03 +00:00
Andrew Morgan ac429050bc Remove redundant security disclaimer 2024-12-11 18:28:45 +00:00
Andrew Morgan daa783f16c 1.121.1 2024-12-11 18:25:44 +00:00
Till 6c4037dcf3
Downgrade ubuntu to 22.04 when building docker images (#18026)
As currently all docker builds are failing.


https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/
https://github.com/actions/runner-images/issues/10636
2024-12-11 18:27:56 +01:00
Till Faelligen 737f6c73f7
Update changelog 2024-12-11 15:20:39 +01:00
Till Faelligen ed6edc17d0
1.121.0 2024-12-11 13:12:50 +01:00