From aec1377d0ba09628ffc399eb977ef507fecd1d28 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 2 Oct 2019 13:55:00 +0100 Subject: [PATCH 1/3] 1.4.0rc2 --- CHANGES.md | 18 ++++++++++++++++++ changelog.d/6117.misc | 1 - changelog.d/6135.bugfix | 1 - changelog.d/6141.bugfix | 1 - changelog.d/6145.bugfix | 1 - changelog.d/6146.bugfix | 1 - synapse/__init__.py | 2 +- 7 files changed, 19 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/6117.misc delete mode 100644 changelog.d/6135.bugfix delete mode 100644 changelog.d/6141.bugfix delete mode 100644 changelog.d/6145.bugfix delete mode 100644 changelog.d/6146.bugfix diff --git a/CHANGES.md b/CHANGES.md index 0a0d0b343..78322a08c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,21 @@ +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. ([\#6135](https://github.com/matrix-org/synapse/issues/6135)) +- Fix bad performance of censoring redactions background task. ([\#6141](https://github.com/matrix-org/synapse/issues/6141)) +- Fix fetching censored redactions from DB, which caused APIs like initial sync to fail if it tried to include the censored redaction. ([\#6145](https://github.com/matrix-org/synapse/issues/6145)) +- Fix exceptions when storing large retry intervals for down remote servers. ([\#6146](https://github.com/matrix-org/synapse/issues/6146)) + + +Internal Changes +---------------- + +- Fix up sample config entry for `redaction_retention_period` option. ([\#6117](https://github.com/matrix-org/synapse/issues/6117)) + + Synapse 1.4.0rc1 (2019-09-26) ============================= diff --git a/changelog.d/6117.misc b/changelog.d/6117.misc deleted file mode 100644 index f8bdb58f4..000000000 --- a/changelog.d/6117.misc +++ /dev/null @@ -1 +0,0 @@ -Fix up sample config entry for `redaction_retention_period` option. diff --git a/changelog.d/6135.bugfix b/changelog.d/6135.bugfix deleted file mode 100644 index 5f9f010cb..000000000 --- a/changelog.d/6135.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix bug in background update that adds last seen information to the `devices` table, and improve its performance on Postgres. diff --git a/changelog.d/6141.bugfix b/changelog.d/6141.bugfix deleted file mode 100644 index c93920b7b..000000000 --- a/changelog.d/6141.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix bad performance of censoring redactions background task. diff --git a/changelog.d/6145.bugfix b/changelog.d/6145.bugfix deleted file mode 100644 index 9e0eb5dd4..000000000 --- a/changelog.d/6145.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix fetching censored redactions from DB, which caused APIs like initial sync to fail if it tried to include the censored redaction. diff --git a/changelog.d/6146.bugfix b/changelog.d/6146.bugfix deleted file mode 100644 index 1dad80183..000000000 --- a/changelog.d/6146.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix exceptions when storing large retry intervals for down remote servers. diff --git a/synapse/__init__.py b/synapse/__init__.py index ddfe9ec54..5197eea22 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -35,4 +35,4 @@ try: except ImportError: pass -__version__ = "1.4.0rc1" +__version__ = "1.4.0rc2" From 0f46bf5737012bb09b40f8e71c5f6db84125df8f Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 3 Oct 2019 12:57:26 +0100 Subject: [PATCH 2/3] Replace client_secret with in server logs (#6158) Replace `client_secret` query parameter values with `` in the logs. Prevents a scenario where a MITM of server traffic can horde 3pids on their account. --- changelog.d/6158.bugfix | 1 + synapse/http/__init__.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog.d/6158.bugfix diff --git a/changelog.d/6158.bugfix b/changelog.d/6158.bugfix new file mode 100644 index 000000000..6b48fce05 --- /dev/null +++ b/changelog.d/6158.bugfix @@ -0,0 +1 @@ +Redact `client_secret` in server logs. diff --git a/synapse/http/__init__.py b/synapse/http/__init__.py index 3acf772cd..3880ce0d9 100644 --- a/synapse/http/__init__.py +++ b/synapse/http/__init__.py @@ -42,11 +42,13 @@ def cancelled_to_request_timed_out_error(value, timeout): ACCESS_TOKEN_RE = re.compile(r"(\?.*access(_|%5[Ff])token=)[^&]*(.*)$") +CLIENT_SECRET_RE = re.compile(r"(\?.*client(_|%5[Ff])secret=)[^&]*(.*)$") def redact_uri(uri): - """Strips access tokens from the uri replaces with """ - return ACCESS_TOKEN_RE.sub(r"\1\3", uri) + """Strips sensitive information from the uri replaces with """ + uri = ACCESS_TOKEN_RE.sub(r"\1\3", uri) + return CLIENT_SECRET_RE.sub(r"\1\3", uri) class QuieterFileBodyProducer(FileBodyProducer): From ecb69d824a39d420a20a1c0b24a7174cea392560 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Thu, 3 Oct 2019 13:22:44 +0100 Subject: [PATCH 3/3] 1.4.0 --- CHANGES.md | 9 +++++++++ changelog.d/6158.bugfix | 1 - debian/changelog | 6 ++++++ synapse/__init__.py | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) delete mode 100644 changelog.d/6158.bugfix diff --git a/CHANGES.md b/CHANGES.md index 78322a08c..165e1d4db 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,12 @@ +Synapse 1.4.0 (2019-10-03) +========================== + +Bugfixes +-------- + +- Redact `client_secret` in server logs. ([\#6158](https://github.com/matrix-org/synapse/issues/6158)) + + Synapse 1.4.0rc2 (2019-10-02) ============================= diff --git a/changelog.d/6158.bugfix b/changelog.d/6158.bugfix deleted file mode 100644 index 6b48fce05..000000000 --- a/changelog.d/6158.bugfix +++ /dev/null @@ -1 +0,0 @@ -Redact `client_secret` in server logs. diff --git a/debian/changelog b/debian/changelog index 76efc442d..60c682cc5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +matrix-synapse-py3 (1.4.0) stable; urgency=medium + + * New synapse release 1.4.0. + + -- Synapse Packaging team Thu, 03 Oct 2019 13:22:25 +0100 + matrix-synapse-py3 (1.3.1) stable; urgency=medium * New synapse release 1.3.1. diff --git a/synapse/__init__.py b/synapse/__init__.py index 5197eea22..2d52d26af 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -35,4 +35,4 @@ try: except ImportError: pass -__version__ = "1.4.0rc2" +__version__ = "1.4.0"