Merge branch 'release-v1.7.2' into matrix-org-hotfixes

This commit is contained in:
Richard van der Hoff 2019-12-20 10:48:04 +00:00
commit 5b5314ee41
18 changed files with 40 additions and 17 deletions

View file

@ -1,3 +1,20 @@
Synapse 1.7.1 (2019-12-18)
==========================
This release includes several security fixes as well as a fix to a bug exposed by the security fixes. Administrators are encouraged to upgrade as soon as possible.
Security updates
----------------
- Fix a bug which could cause room events to be incorrectly authorized using events from a different room. ([\#6501](https://github.com/matrix-org/synapse/issues/6501), [\#6503](https://github.com/matrix-org/synapse/issues/6503), [\#6521](https://github.com/matrix-org/synapse/issues/6521), [\#6524](https://github.com/matrix-org/synapse/issues/6524), [\#6530](https://github.com/matrix-org/synapse/issues/6530), [\#6531](https://github.com/matrix-org/synapse/issues/6531))
- Fix a bug causing responses to the `/context` client endpoint to not use the pruned version of the event. ([\#6553](https://github.com/matrix-org/synapse/issues/6553))
- Fix a cause of state resets in room versions 2 onwards. ([\#6556](https://github.com/matrix-org/synapse/issues/6556), [\#6560](https://github.com/matrix-org/synapse/issues/6560))
Bugfixes
--------
- Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs. ([\#6526](https://github.com/matrix-org/synapse/issues/6526), [\#6527](https://github.com/matrix-org/synapse/issues/6527))
Synapse 1.7.0 (2019-12-13)
==========================
@ -88,7 +105,7 @@ Internal Changes
- Add a test scenario to make sure room history purges don't break `/messages` in the future. ([\#6392](https://github.com/matrix-org/synapse/issues/6392))
- Clarifications for the email configuration settings. ([\#6423](https://github.com/matrix-org/synapse/issues/6423))
- Add more tests to the blacklist when running in worker mode. ([\#6429](https://github.com/matrix-org/synapse/issues/6429))
- Refactor data store layer to support multiple databases in the future. ([\#6454](https://github.com/matrix-org/synapse/issues/6454), [\#6464](https://github.com/matrix-org/synapse/issues/6464), [\#6469](https://github.com/matrix-org/synapse/issues/6469), [\#6487](https://github.com/matrix-org/synapse/issues/6487))
- Refactor data store layer to support multiple databases in the future. ([\#6454](https://github.com/matrix-org/synapse/issues/6454), [\#6464](https://github.com/matrix-org/synapse/issues/6464), [\#6469](https://github.com/matrix-org/synapse/issues/6469), [\#6487](https://github.com/matrix-org/synapse/issues/6487))
- Port synapse.rest.client.v1 to async/await. ([\#6482](https://github.com/matrix-org/synapse/issues/6482))
- Port synapse.rest.client.v2_alpha to async/await. ([\#6483](https://github.com/matrix-org/synapse/issues/6483))
- Port SyncHandler to async/await. ([\#6484](https://github.com/matrix-org/synapse/issues/6484))

View file

@ -1 +0,0 @@
Refactor get_events_from_store_or_dest to return a dict.

View file

@ -1 +0,0 @@
Move get_state methods into FederationHandler.

View file

@ -1 +0,0 @@
Refactor some code in the event authentication path for clarity.

View file

@ -1,2 +0,0 @@
Improve sanity-checking when receiving events over federation.

View file

@ -1 +0,0 @@
Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs.

View file

@ -1 +0,0 @@
Fix a bug which could cause the federation server to incorrectly return errors when handling certain obscure event graphs.

View file

@ -1,2 +0,0 @@
Improve sanity-checking when receiving events over federation.

View file

@ -1 +0,0 @@
Improve sanity-checking when receiving events over federation.

View file

@ -1 +0,0 @@
Fix a bug causing responses to the `/context` client endpoint to not use the pruned version of the event.

View file

@ -1 +0,0 @@
Fix a cause of state resets in room versions 2 onwards.

View file

@ -1 +0,0 @@
Fix a cause of state resets in room versions 2 onwards.

1
changelog.d/6576.bugfix Normal file
View file

@ -0,0 +1 @@
Fix errors when attempting to backfill rooms over federation.

1
changelog.d/6578.bugfix Normal file
View file

@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.7.0 which caused an error on startup when upgrading from versions before 1.3.0.

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
matrix-synapse-py3 (1.7.1) stable; urgency=medium
* New synapse release 1.7.1.
-- Synapse Packaging team <packages@matrix.org> Wed, 18 Dec 2019 09:37:59 +0000
matrix-synapse-py3 (1.7.0) stable; urgency=medium
* New synapse release 1.7.0.

View file

@ -36,7 +36,7 @@ try:
except ImportError:
pass
__version__ = "1.7.0"
__version__ = "1.7.1"
if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
# We import here so that we don't have to install a bunch of deps when

View file

@ -797,7 +797,10 @@ class FederationHandler(BaseHandler):
events_to_state = {}
for e_id in edges:
state, auth = yield self._get_state_for_room(
destination=dest, room_id=room_id, event_id=e_id
destination=dest,
room_id=room_id,
event_id=e_id,
include_event_in_state=False,
)
auth_events.update({a.event_id: a for a in auth})
auth_events.update({s.event_id: s for s in state})

View file

@ -25,6 +25,9 @@ class Sqlite3Engine(object):
def __init__(self, database_module, database_config):
self.module = database_module
database = database_config.get("args", {}).get("database")
self._is_in_memory = database in (None, ":memory:",)
# The current max state_group, or None if we haven't looked
# in the DB yet.
self._current_state_group_id = None
@ -59,7 +62,12 @@ class Sqlite3Engine(object):
return sql
def on_new_connection(self, db_conn):
prepare_database(db_conn, self, config=None)
if self._is_in_memory:
# In memory databases need to be rebuilt each time. Ideally we'd
# reuse the same connection as we do when starting up, but that
# would involve using adbapi before we have started the reactor.
prepare_database(db_conn, self, config=None)
db_conn.create_function("rank", 1, _rank)
def is_deadlock(self, error):