Skip to content

Commit

Permalink
Merge tag 'v1.4.0'
Browse files Browse the repository at this point in the history
Synapse 1.4.0 (2019-10-03)
==========================

Bugfixes
--------

- Redact `client_secret` in server logs. ([\matrix-org#6158](matrix-org#6158))

Synapse 1.4.0rc2 (2019-10-02)
=============================

Bugfixes
--------

- Fix bug in background update that adds last seen information to the `devices` table, and improve its performance on Postgres. ([\matrix-org#6135](matrix-org#6135))
- Fix bad performance of censoring redactions background task. ([\matrix-org#6141](matrix-org#6141))
- Fix fetching censored redactions from DB, which caused APIs like initial sync to fail if it tried to include the censored redaction. ([\matrix-org#6145](matrix-org#6145))
- Fix exceptions when storing large retry intervals for down remote servers. ([\matrix-org#6146](matrix-org#6146))

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

- Fix up sample config entry for `redaction_retention_period` option. ([\matrix-org#6117](matrix-org#6117))

Synapse 1.4.0rc1 (2019-09-26)
=============================

Note that this release includes significant changes around 3pid
verification. Administrators are reminded to review the [upgrade notes](UPGRADE.rst#upgrading-to-v140).

Features
--------

- Changes to 3pid verification:
  - Add the ability to send registration emails from the homeserver rather than delegating to an identity server. ([\matrix-org#5835](matrix-org#5835), [\matrix-org#5940](matrix-org#5940), [\matrix-org#5993](matrix-org#5993), [\matrix-org#5994](matrix-org#5994), [\matrix-org#5868](matrix-org#5868))
  - Replace `trust_identity_server_for_password_resets` config option with `account_threepid_delegates`, and make the `id_server` parameteter optional on `*/requestToken` endpoints, as per [MSC2263](matrix-org/matrix-spec-proposals#2263). ([\matrix-org#5876](matrix-org#5876), [\matrix-org#5969](matrix-org#5969), [\matrix-org#6028](matrix-org#6028))
  - Switch to using the v2 Identity Service `/lookup` API where available, with fallback to v1. (Implements [MSC2134](matrix-org/matrix-spec-proposals#2134) plus `id_access_token authentication` for v2 Identity Service APIs from [MSC2140](matrix-org/matrix-spec-proposals#2140)). ([\matrix-org#5897](matrix-org#5897))
  - Remove `bind_email` and `bind_msisdn` parameters from `/register` ala [MSC2140](matrix-org/matrix-spec-proposals#2140). ([\matrix-org#5964](matrix-org#5964))
  - Add `m.id_access_token` to `unstable_features` in `/versions` as per [MSC2264](matrix-org/matrix-spec-proposals#2264). ([\matrix-org#5974](matrix-org#5974))
  - Use the v2 Identity Service API for 3PID invites. ([\matrix-org#5979](matrix-org#5979))
  - Add `POST /_matrix/client/unstable/account/3pid/unbind` endpoint from [MSC2140](matrix-org/matrix-spec-proposals#2140) for unbinding a 3PID from an identity server without removing it from the homeserver user account. ([\matrix-org#5980](matrix-org#5980), [\matrix-org#6062](matrix-org#6062))
  - Use `account_threepid_delegate.email` and `account_threepid_delegate.msisdn` for validating threepid sessions. ([\matrix-org#6011](matrix-org#6011))
  - Allow homeserver to handle or delegate email validation when adding an email to a user's account. ([\matrix-org#6042](matrix-org#6042))
  - Implement new Client Server API endpoints `/account/3pid/add` and `/account/3pid/bind` as per [MSC2290](matrix-org/matrix-spec-proposals#2290). ([\matrix-org#6043](matrix-org#6043))
  - Add an unstable feature flag for separate add/bind 3pid APIs. ([\matrix-org#6044](matrix-org#6044))
  - Remove `bind` parameter from Client Server POST `/account` endpoint as per [MSC2290](matrix-org/matrix-spec-proposals#2290). ([\matrix-org#6067](matrix-org#6067))
  - Add `POST /add_threepid/msisdn/submit_token` endpoint for proxying submitToken on an `account_threepid_handler`. ([\matrix-org#6078](matrix-org#6078))
  - Add `submit_url` response parameter to `*/msisdn/requestToken` endpoints. ([\matrix-org#6079](matrix-org#6079))
  - Add `m.require_identity_server` flag to /version's unstable_features. ([\matrix-org#5972](matrix-org#5972))
- Enhancements to OpenTracing support:
  - Make OpenTracing work in worker mode. ([\matrix-org#5771](matrix-org#5771))
  - Pass OpenTracing contexts between servers when transmitting EDUs. ([\matrix-org#5852](matrix-org#5852))
  - OpenTracing for device list updates. ([\matrix-org#5853](matrix-org#5853))
  - Add a tag recording a request's authenticated entity and corresponding servlet in OpenTracing. ([\matrix-org#5856](matrix-org#5856))
  - Add minimum OpenTracing for client servlets. ([\matrix-org#5983](matrix-org#5983))
  - Check at setup that OpenTracing is installed if it's enabled in the config. ([\matrix-org#5985](matrix-org#5985))
  - Trace replication send times. ([\matrix-org#5986](matrix-org#5986))
  - Include missing OpenTracing contexts in outbout replication requests. ([\matrix-org#5982](matrix-org#5982))
  - Fix sending of EDUs when OpenTracing is enabled with an empty whitelist. ([\matrix-org#5984](matrix-org#5984))
  - Fix invalid references to None while OpenTracing if the log context slips. ([\matrix-org#5988](matrix-org#5988), [\matrix-org#5991](matrix-org#5991))
  - OpenTracing for room and e2e keys. ([\matrix-org#5855](matrix-org#5855))
  - Add OpenTracing span over HTTP push processing. ([\matrix-org#6003](matrix-org#6003))
- Add an admin API to purge old rooms from the database. ([\matrix-org#5845](matrix-org#5845))
- Retry well-known lookups if we have recently seen a valid well-known record for the server. ([\matrix-org#5850](matrix-org#5850))
- Add support for filtered room-directory search requests over federation ([MSC2197](matrix-org/matrix-spec-proposals#2197), in order to allow upcoming room directory query performance improvements. ([\matrix-org#5859](matrix-org#5859))
- Correctly retry all hosts returned from SRV when we fail to connect. ([\matrix-org#5864](matrix-org#5864))
- Add admin API endpoint for setting whether or not a user is a server administrator. ([\matrix-org#5878](matrix-org#5878))
- Enable cleaning up extremities with dummy events by default to prevent undue build up of forward extremities. ([\matrix-org#5884](matrix-org#5884))
- Add config option to sign remote key query responses with a separate key. ([\matrix-org#5895](matrix-org#5895))
- Add support for config templating. ([\matrix-org#5900](matrix-org#5900))
- Users with the type of "support" or "bot" are no longer required to consent. ([\matrix-org#5902](matrix-org#5902))
- Let synctl accept a directory of config files. ([\matrix-org#5904](matrix-org#5904))
- Increase max display name size to 256. ([\matrix-org#5906](matrix-org#5906))
- Add admin API endpoint for getting whether or not a user is a server administrator. ([\matrix-org#5914](matrix-org#5914))
- Redact events in the database that have been redacted for a week. ([\matrix-org#5934](matrix-org#5934))
- New prometheus metrics:
  - `synapse_federation_known_servers`: represents the total number of servers your server knows about (i.e. is in rooms with), including itself. Enable by setting `metrics_flags.known_servers` to True in the configuration.([\matrix-org#5981](matrix-org#5981))
  - `synapse_build_info`: exposes the Python version, OS version, and Synapse version of the running server. ([\matrix-org#6005](matrix-org#6005))
- Give appropriate exit codes when synctl fails. ([\matrix-org#5992](matrix-org#5992))
- Apply the federation blacklist to requests to identity servers. ([\matrix-org#6000](matrix-org#6000))
- Add `report_stats_endpoint` option to configure where stats are reported to, if enabled. Contributed by @Sorunome. ([\matrix-org#6012](matrix-org#6012))
- Add config option to increase ratelimits for room admins redacting messages. ([\matrix-org#6015](matrix-org#6015))
- Stop sending federation transactions to servers which have been down for a long time. ([\matrix-org#6026](matrix-org#6026))
- Make the process for mapping SAML2 users to matrix IDs more flexible. ([\matrix-org#6037](matrix-org#6037))
- Return a clearer error message when a timeout occurs when attempting to contact an identity server. ([\matrix-org#6073](matrix-org#6073))
- Prevent password reset's submit_token endpoint from accepting trailing slashes. ([\matrix-org#6074](matrix-org#6074))
- Return 403 on `/register/available` if registration has been disabled. ([\matrix-org#6082](matrix-org#6082))
- Explicitly log when a homeserver does not have the `trusted_key_servers` config field configured. ([\matrix-org#6090](matrix-org#6090))
- Add support for pruning old rows in `user_ips` table. ([\matrix-org#6098](matrix-org#6098))

Bugfixes
--------

- Don't create broken room when `power_level_content_override.users` does not contain `creator_id`. ([\matrix-org#5633](matrix-org#5633))
- Fix database index so that different backup versions can have the same sessions. ([\matrix-org#5857](matrix-org#5857))
- Fix Synapse looking for config options `password_reset_failure_template` and `password_reset_success_template`, when they are actually `password_reset_template_failure_html`, `password_reset_template_success_html`. ([\matrix-org#5863](matrix-org#5863))
- Fix stack overflow when recovering an appservice which had an outage. ([\matrix-org#5885](matrix-org#5885))
- Fix error message which referred to `public_base_url` instead of `public_baseurl`. Thanks to @aaronraimist for the fix! ([\matrix-org#5909](matrix-org#5909))
- Fix 404 for thumbnail download when `dynamic_thumbnails` is `false` and the thumbnail was dynamically generated. Fix reported by rkfg. ([\matrix-org#5915](matrix-org#5915))
- Fix a cache-invalidation bug for worker-based deployments. ([\matrix-org#5920](matrix-org#5920))
- Fix admin API for listing media in a room not being available with an external media repo. ([\matrix-org#5966](matrix-org#5966))
- Fix list media admin API always returning an error. ([\matrix-org#5967](matrix-org#5967))
- Fix room and user stats tracking. ([\matrix-org#5971](matrix-org#5971), [\matrix-org#5998](matrix-org#5998), [\matrix-org#6029](matrix-org#6029))
- Return a `M_MISSING_PARAM` if `sid` is not provided to `/account/3pid`. ([\matrix-org#5995](matrix-org#5995))
- `federation_certificate_verification_whitelist` now will not cause `TypeErrors` to be raised (a regression in 1.3). Additionally, it now supports internationalised domain names in their non-canonical representation. ([\matrix-org#5996](matrix-org#5996))
- Only count real users when checking for auto-creation of auto-join room. ([\matrix-org#6004](matrix-org#6004))
- Ensure support users can be registered even if MAU limit is reached. ([\matrix-org#6020](matrix-org#6020))
- Fix bug where login error was shown incorrectly on SSO fallback login. ([\matrix-org#6024](matrix-org#6024))
- Fix bug in calculating the federation retry backoff period. ([\matrix-org#6025](matrix-org#6025))
- Prevent exceptions being logged when extremity-cleanup events fail due to lack of user consent to the terms of service. ([\matrix-org#6053](matrix-org#6053))
- Remove POST method from password-reset `submit_token` endpoint until we implement `submit_url` functionality. ([\matrix-org#6056](matrix-org#6056))
- Fix logcontext spam on non-Linux platforms. ([\matrix-org#6059](matrix-org#6059))
- Ensure query parameters in email validation links are URL-encoded. ([\matrix-org#6063](matrix-org#6063))
- Fix a bug which caused SAML attribute maps to be overridden by defaults. ([\matrix-org#6069](matrix-org#6069))
- Fix the logged number of updated items for the `users_set_deactivated_flag` background update. ([\matrix-org#6092](matrix-org#6092))
- Add `sid` to `next_link` for email validation. ([\matrix-org#6097](matrix-org#6097))
- Threepid validity checks on msisdns should not be dependent on `threepid_behaviour_email`. ([\matrix-org#6104](matrix-org#6104))
- Ensure that servers which are not configured to support email address verification do not offer it in the registration flows. ([\matrix-org#6107](matrix-org#6107))

Updates to the Docker image
---------------------------

- Avoid changing `UID/GID` if they are already correct. ([\matrix-org#5970](matrix-org#5970))
- Provide `SYNAPSE_WORKER` envvar to specify python module. ([\matrix-org#6058](matrix-org#6058))

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

- Convert documentation to markdown (from rst) ([\matrix-org#5849](matrix-org#5849))
- Update `INSTALL.md` to say that Python 2 is no longer supported. ([\matrix-org#5953](matrix-org#5953))
- Add developer documentation for using SAML2. ([\matrix-org#6032](matrix-org#6032))
- Add some notes on rolling back to v1.3.1. ([\matrix-org#6049](matrix-org#6049))
- Update the upgrade notes. ([\matrix-org#6050](matrix-org#6050))

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

- Remove shared-secret registration from `/_matrix/client/r0/register` endpoint. Contributed by Awesome Technologies Innovationslabor GmbH. ([\matrix-org#5877](matrix-org#5877))
- Deprecate the `trusted_third_party_id_servers` option. ([\matrix-org#5875](matrix-org#5875))

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

- Lay the groundwork for structured logging output. ([\matrix-org#5680](matrix-org#5680))
- Retry well-known lookup before the cache expires, giving a grace period where the remote well-known can be down but we still use the old result. ([\matrix-org#5844](matrix-org#5844))
- Remove log line for debugging issue matrix-org#5407. ([\matrix-org#5860](matrix-org#5860))
- Refactor the Appservice scheduler code. ([\matrix-org#5886](matrix-org#5886))
- Compatibility with v2 Identity Service APIs other than /lookup. ([\matrix-org#5892](matrix-org#5892), [\matrix-org#6013](matrix-org#6013))
- Stop populating some unused tables. ([\matrix-org#5893](matrix-org#5893), [\matrix-org#6047](matrix-org#6047))
- Add missing index on `users_in_public_rooms` to improve the performance of directory queries. ([\matrix-org#5894](matrix-org#5894))
- Improve the logging when we have an error when fetching signing keys. ([\matrix-org#5896](matrix-org#5896))
- Add support for database engine-specific schema deltas, based on file extension. ([\matrix-org#5911](matrix-org#5911))
- Update Buildkite pipeline to use plugins instead of buildkite-agent commands. ([\matrix-org#5922](matrix-org#5922))
- Add link in sample config to the logging config schema. ([\matrix-org#5926](matrix-org#5926))
- Remove unnecessary parentheses in return statements. ([\matrix-org#5931](matrix-org#5931))
- Remove unused `jenkins/prepare_sytest.sh` file. ([\matrix-org#5938](matrix-org#5938))
- Move Buildkite pipeline config to the pipelines repo. ([\matrix-org#5943](matrix-org#5943))
- Remove unnecessary return statements in the codebase which were the result of a regex run. ([\matrix-org#5962](matrix-org#5962))
- Remove left-over methods from v1 registration API. ([\matrix-org#5963](matrix-org#5963))
- Cleanup event auth type initialisation. ([\matrix-org#5975](matrix-org#5975))
- Clean up dependency checking at setup. ([\matrix-org#5989](matrix-org#5989))
- Update OpenTracing docs to use the unified `trace` method. ([\matrix-org#5776](matrix-org#5776))
- Small refactor of function arguments and docstrings in` RoomMemberHandler`. ([\matrix-org#6009](matrix-org#6009))
- Remove unused `origin` argument on `FederationHandler.add_display_name_to_third_party_invite`. ([\matrix-org#6010](matrix-org#6010))
- Add a `failure_ts` column to the `destinations` database table. ([\matrix-org#6016](matrix-org#6016), [\matrix-org#6072](matrix-org#6072))
- Clean up some code in the retry logic. ([\matrix-org#6017](matrix-org#6017))
- Fix the structured logging tests stomping on the global log configuration for subsequent tests. ([\matrix-org#6023](matrix-org#6023))
- Clean up the sample config for SAML authentication. ([\matrix-org#6064](matrix-org#6064))
- Change mailer logging to reflect Synapse doesn't just do chat notifications by email now. ([\matrix-org#6075](matrix-org#6075))
- Move last-seen info into devices table. ([\matrix-org#6089](matrix-org#6089))
- Remove unused parameter to `get_user_id_by_threepid`. ([\matrix-org#6099](matrix-org#6099))
- Refactor the user-interactive auth handling. ([\matrix-org#6105](matrix-org#6105))
- Refactor code for calculating registration flows. ([\matrix-org#6106](matrix-org#6106))
  • Loading branch information
anoadragon453 committed Oct 3, 2019
2 parents 466866a + ecb69d8 commit 782dd72
Show file tree
Hide file tree
Showing 303 changed files with 13,375 additions and 5,895 deletions.
5 changes: 3 additions & 2 deletions .buildkite/docker-compose.py35.pg95.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
image: postgres:9.5
environment:
POSTGRES_PASSWORD: postgres
command: -c fsync=off

testenv:
image: python:3.5
Expand All @@ -16,6 +17,6 @@ services:
SYNAPSE_POSTGRES_HOST: postgres
SYNAPSE_POSTGRES_USER: postgres
SYNAPSE_POSTGRES_PASSWORD: postgres
working_dir: /app
working_dir: /src
volumes:
- ..:/app
- ..:/src
5 changes: 3 additions & 2 deletions .buildkite/docker-compose.py37.pg11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
image: postgres:11
environment:
POSTGRES_PASSWORD: postgres
command: -c fsync=off

testenv:
image: python:3.7
Expand All @@ -16,6 +17,6 @@ services:
SYNAPSE_POSTGRES_HOST: postgres
SYNAPSE_POSTGRES_USER: postgres
SYNAPSE_POSTGRES_PASSWORD: postgres
working_dir: /app
working_dir: /src
volumes:
- ..:/app
- ..:/src
5 changes: 3 additions & 2 deletions .buildkite/docker-compose.py37.pg95.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
image: postgres:9.5
environment:
POSTGRES_PASSWORD: postgres
command: -c fsync=off

testenv:
image: python:3.7
Expand All @@ -16,6 +17,6 @@ services:
SYNAPSE_POSTGRES_HOST: postgres
SYNAPSE_POSTGRES_USER: postgres
SYNAPSE_POSTGRES_PASSWORD: postgres
working_dir: /app
working_dir: /src
volumes:
- ..:/app
- ..:/src
15 changes: 15 additions & 0 deletions .buildkite/format_tap.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import sys
from tap.parser import Parser
from tap.line import Result, Unknown, Diagnostic
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/merge_base_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ git config --global user.name "A robot"

# Fetch and merge. If it doesn't work, it will raise due to set -e.
git fetch -u origin $GITBASE
git merge --no-edit origin/$GITBASE
git merge --no-edit --no-commit origin/$GITBASE

# Show what we are after.
git --no-pager show -s
240 changes: 0 additions & 240 deletions .buildkite/pipeline.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[run]
branch = True
parallel = True
include = synapse/*
include=$TOP/synapse/*
data_file = $TOP/.coverage

[report]
precision = 2
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _trial_temp*/
/*.signing.key
/env/
/homeserver*.yaml
/logs
/media_store/
/uploads

Expand All @@ -29,13 +30,13 @@ _trial_temp*/
/.vscode/

# build products
/.coverage*
!/.coveragerc
/.coverage*
/.mypy_cache/
/.tox
/build/
/coverage.*
/dist/
/docs/build/
/htmlcov
/pip-wheel-metadata/

Loading

0 comments on commit 782dd72

Please sign in to comment.