summary refs log tree commit diff
path: root/synapse/state/v1.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-12-04 14:07:28 +0000
committerRichard van der Hoff <richard@matrix.org>2018-12-04 14:07:28 +0000
commit002db39a36ecbe1b09775cb26cf756e436ab1d08 (patch)
treec46c70228af8f87dc5bfcb989383adb062e905ba /synapse/state/v1.py
parentRevert "Merge branch 'rav/timestamp_patch' into matrix-org-hotfixes" (diff)
parentfix upgrade.rst link again (diff)
downloadsynapse-002db39a36ecbe1b09775cb26cf756e436ab1d08.tar.xz
Merge tag 'v0.34.0rc1' into matrix-org-hotfixes
Diffstat (limited to 'synapse/state/v1.py')
-rw-r--r--synapse/state/v1.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/state/v1.py b/synapse/state/v1.py

index 70a981f4a2..19e091ce3b 100644 --- a/synapse/state/v1.py +++ b/synapse/state/v1.py
@@ -298,6 +298,8 @@ def _resolve_normal_events(events, auth_events): def _ordered_events(events): def key_func(e): - return -int(e.depth), hashlib.sha1(e.event_id.encode('ascii')).hexdigest() + # we have to use utf-8 rather than ascii here because it turns out we allow + # people to send us events with non-ascii event IDs :/ + return -int(e.depth), hashlib.sha1(e.event_id.encode('utf-8')).hexdigest() return sorted(events, key=key_func)