diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-10-16 13:41:31 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-10-16 13:41:31 +0100 |
commit | 5df54de801a83c304b932511581c6d4d394469dc (patch) | |
tree | a7c6c6f25b48e35b7d3e38d5030e23df260cab80 /synapse/storage | |
parent | Merge pull request #305 from matrix-org/markjh/v2_sync_api (diff) | |
parent | Encode the filter JSON as UTF-8 before storing in the database. (diff) | |
download | synapse-5df54de801a83c304b932511581c6d4d394469dc.tar.xz |
Merge pull request #308 from matrix-org/markjh/v2_filter_encoding
Encode the filter JSON as UTF-8 before storing in the database.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/filtering.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/filtering.py b/synapse/storage/filtering.py index 8800116570..700da8d8c3 100644 --- a/synapse/storage/filtering.py +++ b/synapse/storage/filtering.py @@ -34,10 +34,10 @@ class FilteringStore(SQLBaseStore): desc="get_user_filter", ) - defer.returnValue(json.loads(def_json)) + defer.returnValue(json.loads(def_json.decode("utf-8"))) def add_user_filter(self, user_localpart, user_filter): - def_json = json.dumps(user_filter) + def_json = json.dumps(user_filter).encode("utf-8") # Need an atomic transaction to SELECT the maximal ID so far then # INSERT a new one |