Commit Graph

23226 Commits (d94aba25a6dbd74b4bbeeb3ef09f130c8e2ceb9e)

Author SHA1 Message Date
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
Patrick Cloke 906dfaa2cf
Support non-OpenID compliant user info endpoints (#14753)
OpenID specifies the format of the user info endpoint and some
OAuth 2.0 IdPs do not follow it, e.g. NextCloud and Twitter.

This adds subject_template and picture_template options to the
default mapping provider for more flexibility in matching those user
info responses.
2023-01-04 08:26:10 -05:00
Nick Mills-Barrett db1cfe9c80
Update all stream IDs after processing replication rows (#14723)
This creates a new store method, `process_replication_position` that
is called after `process_replication_rows`. By moving stream ID advances
here this guarantees any relevant cache invalidations will have been
applied before the stream is advanced.

This avoids race conditions where Python switches between threads mid
way through processing the `process_replication_rows` method where stream
IDs may be advanced before caches are invalidated due to class resolution
ordering.

See this comment/issue for further discussion:
	https://github.com/matrix-org/synapse/issues/14158#issuecomment-1344048703
2023-01-04 11:49:26 +00:00
Andrew Morgan c4456114e1
Add experimental support for MSC3391: deleting account data (#14714) 2023-01-01 03:40:46 +00:00
Patrick Cloke 044fa1a1de
Actually use the picture_claim as configured in OIDC config. (#14751)
Previously it was only using the default value ("picture") when
fetching the picture from the user info.
2022-12-29 12:18:06 -05:00
dependabot[bot] eb9ae47799
Bump attrs from 22.1.0 to 22.2.0 (#14734)
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>
2022-12-29 11:21:56 +01:00
dependabot[bot] 368ad7c5c7
Bump isort from 5.10.1 to 5.11.4 (#14733)
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>
2022-12-29 10:49:30 +01:00
dependabot[bot] 8ea6fd8d0b
Bump setuptools from 65.3.0 to 65.5.1 (#14738)
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>
2022-12-29 10:48:39 +01:00
dependabot[bot] ba2d38f22d
Bump black from 22.10.0 to 22.12.0 (#14735)
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>
2022-12-28 17:53:25 +00:00
dependabot[bot] ee0e00a200
Bump sentry-sdk from 1.12.0 to 1.12.1 (#14736)
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>
2022-12-28 17:53:18 +00:00
dependabot[bot] 9aaf27b42a
Bump towncrier from 22.8.0 to 22.12.0 (#14732)
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>
2022-12-28 17:53:11 +00:00
reivilibre 46993770e5
Suppress the update check in the ruff linter. (#14741)
* Suppress update check in ruff

* Newsfile

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

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-12-28 17:23:19 +00:00
Vertux 8d20b1ba1e
Broken link "request_id_header" (#14740)
* Broken link "request_id_header"

The link above leads to an ERROR 404

* Update docs/reverse_proxy.md

Co-authored-by: reivilibre <olivier@librepush.net>
2022-12-28 15:45:28 +00:00
Brendan Abolivier 3854d0f949
Add a `cached` helper to the module API (#14663) 2022-12-28 13:48:21 +00:00
Patrick Cloke a4ca770655
Add missing type hints to tests. (#14687)
Adds type hints to tests.metrics and tests.crypto.
2022-12-28 08:29:35 -05:00
Dirk Klimpel 2fb4071c1f
Move `email` to Server section in config file documentation (#14730)
* Move `email` to server in config file documentation

* changelog
2022-12-28 12:17:51 +00:00
Richard van der Hoff a52822d39c
Log to-device msgids when we return them over /sync (#14724) 2022-12-23 14:04:50 +00:00
Jeyachandran Rathnam 5c9be9c760
Check sqlite database file exists before porting. (#14692)
To avoid creating an empty SQLite file if the given path
is incorrect.
2022-12-22 13:26:37 -05:00
Patrick Cloke 14abf22dd6 Update docs about ruff vs. flake8. 2022-12-21 13:08:20 -05:00
Patrick Cloke 7010a3d015
Switch to ruff instead of flake8. (#14633)
ruff is a flake8-compatible Python linter written in Rust.
It supports the flake8 plugins that we use and is significantly
faster in testing.
2022-12-21 13:05:21 -05:00
Patrick Cloke 5831bed450
Bump minimum PyYAML to 3.13. (#14720)
PyYAML 3.13 fixes some issues with Python 3.7 compatibility
and was released in 2018.
2022-12-21 12:29:19 -05:00
Olivier Wilkinson (reivilibre) 5a1b56b9b0 Merge branch 'rei/dresync_exp' into matrix-org-hotfixes 2022-12-21 13:13:30 +00:00
Olivier Wilkinson (reivilibre) 62e4ad7991 Use the multi-user device resync to batch requests 2022-12-21 13:12:53 +00:00
Olivier Wilkinson (reivilibre) b624e010f1 (remove no-op changelog entry) 2022-12-21 12:28:55 +00:00
reivilibre ec656be480
Revert update of hiredis in Poetry lockfile: revert from 2.1.0 to 2.0.0. (#14718)
* Revert "Bump hiredis from 2.0.0 to 2.1.0 (#14699)"

This reverts commit 9c89707b56.

* Newsfile

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

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-12-21 12:28:13 +00:00
Olivier Wilkinson (reivilibre) 24b802a524 Merge branch 'rei/dresync_exp' into matrix-org-hotfixes 2022-12-21 11:42:37 +00:00
Olivier Wilkinson (reivilibre) 55a4d7e1ce Typo fix 2022-12-21 11:42:31 +00:00
Olivier Wilkinson (reivilibre) ad8265562d Merge branch 'rei/hiredis_210_no_sdist' into matrix-org-hotfixes 2022-12-21 11:12:50 +00:00
Olivier Wilkinson (reivilibre) 50a56edcc2 Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-12-21 11:04:34 +00:00
Olivier Wilkinson (reivilibre) 3ac08cc0be Revert "Bump hiredis from 2.0.0 to 2.1.0 (#14699)"
This reverts commit 9c89707b56.
2022-12-21 11:03:26 +00:00
Olivier Wilkinson (reivilibre) 83dab8e25f Merge branch 'rei/dresync_exp' into matrix-org-hotfixes 2022-12-21 10:51:29 +00:00
Olivier Wilkinson (reivilibre) 65981bcb27 Merge branch 'rei/jumptodate_statement_limit' into matrix-org-hotfixes 2022-12-21 10:51:27 +00:00
Olivier Wilkinson (reivilibre) cbf1cebef3 Mitigate jump to date slowness by adding 30s timeout 2022-12-20 18:30:47 +00:00
Olivier Wilkinson (reivilibre) 46807789d0 Newsfile
Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 712144e768 Batch up the DB writes when marking failures 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 3d7451e04f Split out the marking of failed 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 3c68aa4342 Use the multi-user path even for single users
This is futureproofing: we'll be able to rip out the single-user path later
2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 369a97a714 Use assertions to ensure we don't have our expectations broken 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) b4f98428ca Add a replication servlet for multi-user device resync 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 55f46d499b Add multi-user device resync in handler 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 7d2261f922 Limit query_devices_for_destination to 10 concurrent invocations 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 227c953d99 Add async helpers 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 9c4562c74a Add log lines 2022-12-20 18:21:31 +00:00
Olivier Wilkinson (reivilibre) 2654d61114 Build a set of who we are interested in first and foremost 2022-12-20 18:21:31 +00:00
Sean Quah 43c54ba753 Merge branch 'master' into develop 2022-12-20 18:09:30 +00:00
Sean Quah 774e20b570 1.74.0 2022-12-20 16:08:33 +00:00
Mathieu Velten eb2defc2f7
Add release note and update doc regarding ICU (#14712)
Fixes #14704.

Signed-off-by: Mathieu Velten <mathieuv@matrix.org>
2022-12-20 16:06:26 +00:00
dependabot[bot] 4be998add4
Bump lxml from 4.9.1 to 4.9.2 (#14698)
* Bump lxml from 4.9.1 to 4.9.2

Bumps [lxml](https://github.com/lxml/lxml) from 4.9.1 to 4.9.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.1...lxml-4.9.2)

---
updated-dependencies:
- dependency-name: lxml
  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>
Co-authored-by: reivilibre <oliverw@matrix.org>
2022-12-19 16:48:20 +00:00