Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into clokep/key-share-r…
Browse files Browse the repository at this point in the history
…ate-limit
  • Loading branch information
clokep committed Feb 11, 2021
2 parents b8b86be + 80d6dc9 commit 4f72389
Show file tree
Hide file tree
Showing 165 changed files with 3,918 additions and 1,000 deletions.
74 changes: 72 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,78 @@
Unreleased
==========
Synapse 1.27.0rc1 (2021-02-02)
==============================

Note that this release includes a change in Synapse to use Redis as a cache ─ as well as a pub/sub mechanism ─ if Redis support is enabled. No action is needed by server administrators, and we do not expect resource usage of the Redis instance to change dramatically.

This release also changes the callback URI for OpenID Connect (OIDC) identity providers. If your server is configured to use single sign-on via an OIDC/OAuth2 IdP, you may need to make configuration changes. Please review [UPGRADE.rst](UPGRADE.rst) for more details on these changes.

This release also changes escaping of variables in the HTML templates for SSO or email notifications. If you have customised these templates, please review [UPGRADE.rst](UPGRADE.rst) for more details on these changes.


Features
--------

- Add an admin API for getting and deleting forward extremities for a room. ([\#9062](https://github.com/matrix-org/synapse/issues/9062))
- Add an admin API for retrieving the current room state of a room. ([\#9168](https://github.com/matrix-org/synapse/issues/9168))
- Add experimental support for allowing clients to pick an SSO Identity Provider ([MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858)). ([\#9183](https://github.com/matrix-org/synapse/issues/9183), [\#9242](https://github.com/matrix-org/synapse/issues/9242))
- Add an admin API endpoint for shadow-banning users. ([\#9209](https://github.com/matrix-org/synapse/issues/9209))
- Add ratelimits to the 3PID `/requestToken` APIs. ([\#9238](https://github.com/matrix-org/synapse/issues/9238))
- Add support to the OpenID Connect integration for adding the user's email address. ([\#9245](https://github.com/matrix-org/synapse/issues/9245))
- Add ratelimits to invites in rooms and to specific users. ([\#9258](https://github.com/matrix-org/synapse/issues/9258))
- Improve the user experience of setting up an account via single-sign on. ([\#9262](https://github.com/matrix-org/synapse/issues/9262), [\#9272](https://github.com/matrix-org/synapse/issues/9272), [\#9275](https://github.com/matrix-org/synapse/issues/9275), [\#9276](https://github.com/matrix-org/synapse/issues/9276), [\#9277](https://github.com/matrix-org/synapse/issues/9277), [\#9286](https://github.com/matrix-org/synapse/issues/9286), [\#9287](https://github.com/matrix-org/synapse/issues/9287))
- Add phone home stats for encrypted messages. ([\#9283](https://github.com/matrix-org/synapse/issues/9283))
- Update the redirect URI for OIDC authentication. ([\#9288](https://github.com/matrix-org/synapse/issues/9288))


Bugfixes
--------

- Fix spurious errors in logs when deleting a non-existant pusher. ([\#9121](https://github.com/matrix-org/synapse/issues/9121))
- Fix a long-standing bug where Synapse would return a 500 error when a thumbnail did not exist (and auto-generation of thumbnails was not enabled). ([\#9163](https://github.com/matrix-org/synapse/issues/9163))
- Fix a long-standing bug where an internal server error was raised when attempting to preview an HTML document in an unknown character encoding. ([\#9164](https://github.com/matrix-org/synapse/issues/9164))
- Fix a long-standing bug where invalid data could cause errors when calculating the presentable room name for push. ([\#9165](https://github.com/matrix-org/synapse/issues/9165))
- Fix bug where we sometimes didn't detect that Redis connections had died, causing workers to not see new data. ([\#9218](https://github.com/matrix-org/synapse/issues/9218))
- Fix a bug where `None` was passed to Synapse modules instead of an empty dictionary if an empty module `config` block was provided in the homeserver config. ([\#9229](https://github.com/matrix-org/synapse/issues/9229))
- Fix a bug in the `make_room_admin` admin API where it failed if the admin with the greatest power level was not in the room. Contributed by Pankaj Yadav. ([\#9235](https://github.com/matrix-org/synapse/issues/9235))
- Prevent password hashes from getting dropped if a client failed threepid validation during a User Interactive Auth stage. Removes a workaround for an ancient bug in Riot Web <v0.7.4. ([\#9265](https://github.com/matrix-org/synapse/issues/9265))
- Fix single-sign-on when the endpoints are routed to synapse workers. ([\#9271](https://github.com/matrix-org/synapse/issues/9271))


Improved Documentation
----------------------

- Add docs for using Gitea as OpenID provider. ([\#9134](https://github.com/matrix-org/synapse/issues/9134))
- Add link to Matrix VoIP tester for turn-howto. ([\#9135](https://github.com/matrix-org/synapse/issues/9135))
- Add notes on integrating with Facebook for SSO login. ([\#9244](https://github.com/matrix-org/synapse/issues/9244))


Deprecations and Removals
-------------------------

- The `service_url` parameter in `cas_config` is deprecated in favor of `public_baseurl`. ([\#9199](https://github.com/matrix-org/synapse/issues/9199))
- Add new endpoint `/_synapse/client/saml2` for SAML2 authentication callbacks, and deprecate the old endpoint `/_matrix/saml2`. ([\#9289](https://github.com/matrix-org/synapse/issues/9289))


Internal Changes
----------------

- Add tests to `test_user.UsersListTestCase` for List Users Admin API. ([\#9045](https://github.com/matrix-org/synapse/issues/9045))
- Various improvements to the federation client. ([\#9129](https://github.com/matrix-org/synapse/issues/9129))
- Speed up chain cover calculation when persisting a batch of state events at once. ([\#9176](https://github.com/matrix-org/synapse/issues/9176))
- Add a `long_description_type` to the package metadata. ([\#9180](https://github.com/matrix-org/synapse/issues/9180))
- Speed up batch insertion when using PostgreSQL. ([\#9181](https://github.com/matrix-org/synapse/issues/9181), [\#9188](https://github.com/matrix-org/synapse/issues/9188))
- Emit an error at startup if different Identity Providers are configured with the same `idp_id`. ([\#9184](https://github.com/matrix-org/synapse/issues/9184))
- Improve performance of concurrent use of `StreamIDGenerators`. ([\#9190](https://github.com/matrix-org/synapse/issues/9190))
- Add some missing source directories to the automatic linting script. ([\#9191](https://github.com/matrix-org/synapse/issues/9191))
- Precompute joined hosts and store in Redis. ([\#9198](https://github.com/matrix-org/synapse/issues/9198), [\#9227](https://github.com/matrix-org/synapse/issues/9227))
- Clean-up template loading code. ([\#9200](https://github.com/matrix-org/synapse/issues/9200))
- Fix the Python 3.5 old dependencies build. ([\#9217](https://github.com/matrix-org/synapse/issues/9217))
- Update `isort` to v5.7.0 to bypass a bug where it would disagree with `black` about formatting. ([\#9222](https://github.com/matrix-org/synapse/issues/9222))
- Add type hints to handlers code. ([\#9223](https://github.com/matrix-org/synapse/issues/9223), [\#9232](https://github.com/matrix-org/synapse/issues/9232))
- Fix Debian package building on Ubuntu 16.04 LTS (Xenial). ([\#9254](https://github.com/matrix-org/synapse/issues/9254))
- Minor performance improvement during TLS handshake. ([\#9255](https://github.com/matrix-org/synapse/issues/9255))
- Refactor the generation of summary text for email notifications. ([\#9260](https://github.com/matrix-org/synapse/issues/9260))
- Restore PyPy compatibility by not calling CPython-specific GC methods when under PyPy. ([\#9270](https://github.com/matrix-org/synapse/issues/9270))


Synapse 1.26.0 (2021-01-27)
===========================
Expand Down
20 changes: 3 additions & 17 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,29 +151,15 @@ sudo pacman -S base-devel python python-pip \

##### CentOS/Fedora

Installing prerequisites on CentOS 8 or Fedora>26:
Installing prerequisites on CentOS or Fedora Linux:

```sh
sudo dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
libwebp-devel tk-devel redhat-rpm-config \
python3-virtualenv libffi-devel openssl-devel
libwebp-devel libxml2-devel libxslt-devel libpq-devel \
python3-virtualenv libffi-devel openssl-devel python3-devel
sudo dnf groupinstall "Development Tools"
```

Installing prerequisites on CentOS 7 or Fedora<=25:

```sh
sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel \
lcms2-devel libwebp-devel tcl-devel tk-devel redhat-rpm-config \
python3-virtualenv libffi-devel openssl-devel
sudo yum groupinstall "Development Tools"
```

Note that Synapse does not support versions of SQLite before 3.11, and CentOS 7
uses SQLite 3.7. You may be able to work around this by installing a more
recent SQLite version, but it is recommended that you instead use a Postgres
database: see [docs/postgres.md](docs/postgres.md).

##### macOS

Installing prerequisites on macOS:
Expand Down
21 changes: 18 additions & 3 deletions UPGRADE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,30 @@ for example:
Upgrading to v1.27.0
====================

Changes to callback URI for OAuth2 / OpenID Connect
---------------------------------------------------

This version changes the URI used for callbacks from OAuth2 identity providers. If
your server is configured for single sign-on via an OpenID Connect or OAuth2 identity
provider, you will need to add ``[synapse public baseurl]/_synapse/client/oidc/callback``
to the list of permitted "redirect URIs" at the identity provider.

See `docs/openid.md <docs/openid.md>`_ for more information on setting up OpenID
Connect.

(Note: a similar change is being made for SAML2; in this case the old URI
``[synapse public baseurl]/_matrix/saml2`` is being deprecated, but will continue to
work, so no immediate changes are required for existing installations.)

Changes to HTML templates
-------------------------

The HTML templates for SSO and email notifications now have `Jinja2's autoescape <https://jinja.palletsprojects.com/en/2.11.x/api/#autoescaping>`_
enabled for files ending in ``.html``, ``.htm``, and ``.xml``. If you hae customised
enabled for files ending in ``.html``, ``.htm``, and ``.xml``. If you have customised
these templates and see issues when viewing them you might need to update them.
It is expected that most configurations will need no changes.

If you have customised the templates *names* for these templates it is recommended
If you have customised the templates *names* for these templates, it is recommended
to verify they end in ``.html`` to ensure autoescape is enabled.

The above applies to the following templates:
Expand Down Expand Up @@ -235,7 +250,7 @@ shown below:
return {"localpart": localpart}
Removal historical Synapse Admin API
Removal historical Synapse Admin API
------------------------------------

Historically, the Synapse Admin API has been accessible under:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/9003.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix 'object name reserved for internal use' errors with recent versions of SQLite.
1 change: 0 additions & 1 deletion changelog.d/9045.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9062.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9121.bugfix

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9123.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add experimental support for running Synapse with PyPy.
1 change: 0 additions & 1 deletion changelog.d/9129.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9135.doc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9150.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New API /_synapse/admin/rooms/{roomId}/context/{eventId}.
1 change: 0 additions & 1 deletion changelog.d/9163.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9164.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9165.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9176.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9180.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9181.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9183.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9184.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9188.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9190.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9191.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9198.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9199.removal

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9200.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9209.feature

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9217.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9218.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9222.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9223.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9227.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9229.bugfix

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9232.misc

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/9235.bugfix

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9240.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deny access to additional IP addresses by default.
1 change: 0 additions & 1 deletion changelog.d/9244.doc

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/9257.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix long-standing bug where sending email push would fail for rooms that the server had since left.
1 change: 1 addition & 0 deletions changelog.d/9291.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add note to `auto_join_rooms` config option explaining existing rooms must be publicly joinable.
1 change: 1 addition & 0 deletions changelog.d/9296.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug in Synapse 1.27.0rc1 which meant the "session expired" error page during SSO registration was badly formatted.
1 change: 1 addition & 0 deletions changelog.d/9297.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Further improvements to the user experience of registration via single sign-on.
1 change: 1 addition & 0 deletions changelog.d/9299.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update the `Cursor` type hints to better match PEP 249.
1 change: 1 addition & 0 deletions changelog.d/9300.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Further improvements to the user experience of registration via single sign-on.
1 change: 1 addition & 0 deletions changelog.d/9301.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Further improvements to the user experience of registration via single sign-on.
1 change: 1 addition & 0 deletions changelog.d/9302.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix new ratelimiting for invites to respect the `ratelimit` flag on application services. Introduced in v1.27.0rc1.
1 change: 1 addition & 0 deletions changelog.d/9305.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add debug logging for SRV lookups. Contributed by @Bubu.
1 change: 1 addition & 0 deletions changelog.d/9307.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve logging for OIDC login flow.
1 change: 1 addition & 0 deletions changelog.d/9308.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correct name of Synapse's service file in TURN howto.
1 change: 1 addition & 0 deletions changelog.d/9310.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify the sample configuration for changes made to the template loading code.
1 change: 1 addition & 0 deletions changelog.d/9311.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook to spam checker modules that allow checking file uploads and remote downloads.
1 change: 1 addition & 0 deletions changelog.d/9317.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the braces in the `oidc_providers` section of the sample config.
1 change: 1 addition & 0 deletions changelog.d/9321.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assert a maximum length for the `client_secret` parameter for spec compliance.
1 change: 1 addition & 0 deletions changelog.d/9322.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update installation instructions on Fedora.
1 change: 1 addition & 0 deletions changelog.d/9333.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix additional errors when previewing URLs: "AttributeError 'NoneType' object has no attribute 'xpath'" and "ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.".
1 change: 1 addition & 0 deletions changelog.d/9361.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug causing Synapse to impose the wrong type constraints on fields when processing responses from appservices to `/_matrix/app/v1/thirdparty/user/{protocol}`.
4 changes: 3 additions & 1 deletion debian/build_virtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ esac
# Use --builtin-venv to use the better `venv` module from CPython 3.4+ rather
# than the 2/3 compatible `virtualenv`.

# Pin pip to 20.3.4 to fix breakage in 21.0 on py3.5 (xenial)

dh_virtualenv \
--install-suffix "matrix-synapse" \
--builtin-venv \
--python "$SNAKE" \
--upgrade-pip \
--upgrade-pip-to="20.3.4" \
--preinstall="lxml" \
--preinstall="mock" \
--extra-pip-arg="--no-cache-dir" \
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.26.0+nmu1) UNRELEASED; urgency=medium

* Fix build on Ubuntu 16.04 LTS (Xenial).

-- Dan Callahan <danc@element.io> Thu, 28 Jan 2021 16:21:03 +0000

matrix-synapse-py3 (1.26.0) stable; urgency=medium

[ Richard van der Hoff ]
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile-dhvirtualenv
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get install \
wget

# fetch and unpack the package
# TODO: Upgrade to 1.2.2 once xenial is dropped
RUN mkdir /dh-virtualenv
RUN wget -q -O /dh-virtualenv.tar.gz https://github.com/spotify/dh-virtualenv/archive/ac6e1b1.tar.gz
RUN tar -xv --strip-components=1 -C /dh-virtualenv -f /dh-virtualenv.tar.gz
Expand Down
Loading

0 comments on commit 4f72389

Please sign in to comment.