Commit Graph

22837 Commits

Author SHA1 Message Date
Sean Quah
772e8c2385
Fix stack overflow in _PerHostRatelimiter due to synchronous requests (#14812)
When there are many synchronous requests waiting on a
`_PerHostRatelimiter`, each request will be started recursively just
after the previous request has completed. Under the right conditions,
this leads to stack exhaustion.

A common way for requests to become synchronous is when the remote
client disconnects early, because the homeserver is overloaded and slow
to respond.

Avoid stack exhaustion under these conditions by deferring subsequent
requests until the next reactor tick.

Fixes #14480.

Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-13 00:16:21 +00:00
H. Shay
12083d37a8 Merge branch 'release-v1.75' into develop 2023-01-12 12:40:09 -08:00
H. Shay
ea45257199 1.75.0rc2 2023-01-12 10:30:54 -08:00
Richard van der Hoff
0f061f39f0 Merge remote-tracking branch 'origin/release-v1.75' into develop 2023-01-12 16:45:23 +00:00
Andrew Morgan
f5ea9f2b1d
Add rust linting commands to scripts-dev/lint.sh (#14822) 2023-01-12 16:20:34 +00:00
Erik Johnston
b50c008453
Re-enable some linting (#14821)
* Re-enable some linting

* Newsfile

* Remove comment
2023-01-12 10:52:07 +00:00
Erik Johnston
84ce93c12f
Fix race calling /members?at= (#14817)
Fixes #14814
2023-01-12 10:29:09 +00:00
Emelie Graven
dd9e71dc7f
Add set_displayname to the module API (#14629) 2023-01-11 18:41:52 +00:00
Patrick Cloke
071f8b0f9b
Factor out common code in tests and fix comments. (#14819) 2023-01-11 13:36:41 -05:00
Andrew Morgan
f4d2a734f9
Remove outdated commands from the code style doc & point to the contributing guide. (#14773) 2023-01-11 15:21:12 +00:00
reivilibre
5172c8c403
Faster remote room joins (worker mode): do not populate external hosts-in-room cache when sending events as this requires blocking for full state. (#14749)
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
Co-authored-by: Sean Quah <seanq@matrix.org>
2023-01-11 13:21:53 +00:00
Patrick Cloke
7f2cabf271
Fix-up type hints for tests.push module. (#14816) 2023-01-11 07:35:40 -05:00
reivilibre
d6bda5addd
Add index to improve performance of the /timestamp_to_event endpoint used for jumping to a specific date in the timeline of a room. (#14799) 2023-01-11 12:29:13 +00:00
Patrick Cloke
3952297f6f
Calculate rooms changed for device lists to work. (#14810)
Back-out some changes from 7e582a25f8
(#14786) which skipped necessary logic to calculate device lists properly.
2023-01-11 12:16:41 +00:00
Dirk Klimpel
73f097888e
Add listener health (#14747)
Fixes: #8780
2023-01-11 12:00:38 +00:00
Andrew Morgan
7b3a8f2b0c
Add poetry.toml to .gitignore (#14807) 2023-01-11 11:44:13 +00:00
Dirk Klimpel
bc7ca704dd
Add tag to listeners documentation (#14803)
* Add `tag` to `listeners` documentation

* newsfile
2023-01-11 10:47:44 +00:00
Richard van der Hoff
06ab64f201
Implement MSC3925: changes to bundling of edits (#14811)
Two parts to this:

 * Bundle the whole of the replacement with any edited events. This is backwards-compatible so I haven't put it behind a flag.
 * Optionally, inhibit server-side replacement of edited events. This has scope to break things, so it is currently disabled by default.
2023-01-10 16:31:28 +00:00
David Robertson
f417fb84b8
Update changelog 2 2023-01-10 12:30:01 +00:00
David Robertson
e5c01272a7
Update changelog 2023-01-10 12:26:19 +00:00
David Robertson
9a4c69f59f
1.75.0rc1 2023-01-10 12:18:50 +00:00
reivilibre
ba4ea7d13f
Batch up replication requests to request the resyncing of remote users's devices. (#14716) 2023-01-10 11:17:59 +00:00
Dirk Klimpel
3479599387
Add missing worker settings to shared configuration (#14748)
* Add missing worker settings to shared configuration

* newsfile

* update docs after review

* more update for doc

* This -> These

Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
2023-01-09 18:35:19 +00:00
Andrew Morgan
54a7228fa6
Skip testing pypy-3.7-linux wheels as we don't have openssl 3.x on manylinux2014 (#14802) 2023-01-09 17:51:37 +00:00
Jeyachandran Rathnam
58d2adc3da
Remove undocumented device from pushrules (#14727)
* Remove undocumented device from pushrules

* Add changelog

* Update changelog.d/14727.misc

* Rename 14727.misc to 14727.bugfix

Co-authored-by: David Robertson <davidr@element.io>
2023-01-09 17:17:24 +00:00
Dirk Klimpel
c7b2c31161
Update link to towncrier in contribution guide (#14801)
* Update link to towncrier in contribution guide

* newsfile
2023-01-09 16:33:49 +00:00
David Robertson
c0145b06f5
Fix upgrade notes for installing ICU (#14797)
* Fix upgrade notes for installing ICU

As noticed in https://github.com/matrix-org/synapse/pull/14712/files#r1058433297

* Changelog
2023-01-09 14:43:46 +00:00
Jeyachandran Rathnam
babeeb4e7a
Unescape HTML entities in oEmbed titles. (#14781)
It doesn't seem valid that HTML entities should appear in
the title field of oEmbed responses, but a popular WordPress
plug-in seems to do it.

There should not be harm in unescaping these.
2023-01-09 14:22:02 +00:00
Patrick Cloke
7e582a25f8
Improve /sync performance of when passing filters with empty arrays. (#14786)
This has two related changes:

* It enables fast-path processing for an empty filter (`[]`) which was
  previously only used for wildcard not-filters (`["*"]`).
* It special cases a `/sync` filter with no-rooms to skip all room
  processing, previously we would partially skip processing, but would
  generally still calculate intermediate values for each room which were
  then unused.

Future changes might consider further optimizations:

* Skip calculating per-room account data when all rooms are filtered (currently
  this is thrown away).
* Make similar improvements to other endpoints which support filters.
2023-01-09 08:43:50 -05:00
Jeyachandran Rathnam
5e0888076f
Disable sending confirmation email when 3pid is disabled #14682 (#14725)
* Fixes #12277 :Disable sending confirmation email when 3pid is disabled

* Fix test_add_email_if_disabled test case to reflect changes to enable_3pid_changes flag

* Add changelog file

* Rename newsfragment.

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2023-01-09 11:12:03 +00:00
dependabot[bot]
b4de0c63df
Bump peaceiris/actions-gh-pages from 3.9.0 to 3.9.1 (#14791)
* Bump peaceiris/actions-gh-pages from 3.9.0 to 3.9.1

Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3.9.0 to 3.9.1.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](de7ea6f8ef...64b46b4226)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:09:13 +00:00
dependabot[bot]
1438f93948
Bump importlib-metadata from 4.2.0 to 6.0.0 (#14795)
* Bump importlib-metadata from 4.2.0 to 6.0.0

Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 4.2.0 to 6.0.0.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/CHANGES.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v4.2.0...v6.0.0)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:08:50 +00:00
dependabot[bot]
32c2ff8eab
Bump ruff from 0.0.206 to 0.0.215 (#14796)
* Bump ruff from 0.0.206 to 0.0.215

Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.206 to 0.0.215.
- [Release notes](https://github.com/charliermarsh/ruff/releases)
- [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.206...v0.0.215)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:08:43 +00:00
dependabot[bot]
51c8ebec33
Bump types-setuptools from 65.6.0.2 to 65.6.0.3 (#14794)
* Bump types-setuptools from 65.6.0.2 to 65.6.0.3

Bumps [types-setuptools](https://github.com/python/typeshed) from 65.6.0.2 to 65.6.0.3.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:08:03 +00:00
dependabot[bot]
0ae8feee18
Bump pyopenssl from 22.1.0 to 23.0.0 (#14793)
* Bump pyopenssl from 22.1.0 to 23.0.0

Bumps [pyopenssl](https://github.com/pyca/pyopenssl) from 22.1.0 to 23.0.0.
- [Release notes](https://github.com/pyca/pyopenssl/releases)
- [Changelog](https://github.com/pyca/pyopenssl/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/pyopenssl/compare/22.1.0...23.0.0)

---
updated-dependencies:
- dependency-name: pyopenssl
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:07:52 +00:00
dependabot[bot]
331797586e
Bump types-pillow from 9.3.0.4 to 9.4.0.0 (#14792)
* Bump types-pillow from 9.3.0.4 to 9.4.0.0

Bumps [types-pillow](https://github.com/python/typeshed) from 9.3.0.4 to 9.4.0.0.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-pillow
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-09 10:07:24 +00:00
reivilibre
1984fc16f1
Use htmltest to check links in the Synapse documentation. (#14743)
* Add htmltest to check links in the documentation

* Newsfile

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2023-01-05 18:21:45 +00:00
reivilibre
4eb2f4e02b
Fix broken links in the Synapse documentation. (#14744)
* Fix stale external links

* Fix some internal links

* Fix URLs without trailing / where needed

* Fix more links

* Newsfile

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>

* Reapply docs/openid.md fix after conflict

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2023-01-05 18:18:00 +00:00
dependabot[bot]
7b642167e6
Bump JasonEtco/create-an-issue from 2.8.2 to 2.9.1 (#14731)
* Bump JasonEtco/create-an-issue from 2.8.2 to 2.9.1

Bumps [JasonEtco/create-an-issue](https://github.com/JasonEtco/create-an-issue) from 2.8.2 to 2.9.1.
- [Release notes](https://github.com/JasonEtco/create-an-issue/releases)
- [Commits](3a8ba79651...e27dddc79c)

---
updated-dependencies:
- dependency-name: JasonEtco/create-an-issue
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: reivilibre <oliverw@matrix.org>
Co-authored-by: Mathieu Velten <mathieuv@matrix.org>
2023-01-05 10:10:43 +00:00
dependabot[bot]
70961911a8
Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3 (#14779)
* Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3

Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2.24.2 to 2.24.3.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](e6e25ac3a2...bd10f381a9)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-05 09:51:09 +00:00
dependabot[bot]
da911e9ddf
Bump types-requests from 2.28.11.5 to 2.28.11.7 (#14763)
* Bump types-requests from 2.28.11.5 to 2.28.11.7

Bumps [types-requests](https://github.com/python/typeshed) from 2.28.11.5 to 2.28.11.7.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-05 09:50:52 +00:00
dependabot[bot]
bd9ada3860
Bump pillow from 9.3.0 to 9.4.0 (#14762)
* Bump pillow from 9.3.0 to 9.4.0

Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.3.0 to 9.4.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.3.0...9.4.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-05 09:50:41 +00:00
dependabot[bot]
be26379d00
Bump gitpython from 3.1.29 to 3.1.30 (#14761)
* Bump gitpython from 3.1.29 to 3.1.30

Bumps [gitpython](https://github.com/gitpython-developers/GitPython) from 3.1.29 to 3.1.30.
- [Release notes](https://github.com/gitpython-developers/GitPython/releases)
- [Changelog](https://github.com/gitpython-developers/GitPython/blob/main/CHANGES)
- [Commits](https://github.com/gitpython-developers/GitPython/compare/3.1.29...3.1.30)

---
updated-dependencies:
- dependency-name: gitpython
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2023-01-05 09:50:14 +00:00
dependabot[bot]
62aa5c514d
Bump pydantic from 1.10.2 to 1.10.4 (#14760) 2023-01-05 09:50:03 +00:00
dependabot[bot]
f79ef37b8c
Bump ruff from 0.0.189 to 0.0.206 (#14759) 2023-01-05 09:49:50 +00:00
dependabot[bot]
827678196e
Bump serde from 1.0.151 to 1.0.152 (#14758) 2023-01-05 09:49:35 +00:00
Patrick Cloke
44b476b26e
Document how to use Twitter as an OAuth 2.0 provider. (#14778)
This also alphabetizes the documentation for the various OpenID providers.
2023-01-04 15:00:27 -05:00
Patrick Cloke
630d0aeaf6
Support RFC7636 PKCE in the OAuth 2.0 flow. (#14750)
PKCE can protect against certain attacks and is enabled by default. Support
can be controlled manually by setting the pkce_method of each oidc_providers
entry to 'auto' (default), 'always', or 'never'.

This is required by Twitter OAuth 2.0 support.
2023-01-04 14:58:08 -05:00
Erik Johnston
747f8eb231
Use env vars in GHA dependabot changelog (#14772) 2023-01-04 16:46:25 +00:00
Andrew Morgan
e787fb776c
Switch to our fork of dh-virtualenv for compatibility with Python 3.11 (#14774) 2023-01-04 16:26:29 +00:00