summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-12-14 13:55:46 +0000
committerMark Haines <mark.haines@matrix.org>2015-12-14 13:55:46 +0000
commit98dfa7d24f91ff083b36f1379ce2426c8e6cdb75 (patch)
tree4a8347cb57e23a68f3c7195babba22503877dcfa /synapse
parentMerge pull request #436 from matrix-org/markjh/pip_instructions (diff)
downloadsynapse-98dfa7d24f91ff083b36f1379ce2426c8e6cdb75.tar.xz
Skip events that where the body, name or topic isn't a string when back populating the FTS index
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/search.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/search.py b/synapse/storage/search.py
index 39f600f53c..04246101df 100644
--- a/synapse/storage/search.py
+++ b/synapse/storage/search.py
@@ -85,6 +85,11 @@ class SearchStore(BackgroundUpdateStore):
                     # skip over it.
                     continue
 
+                if not isinstance(value, basestring):
+                    # If the event body, name or topic isn't a string
+                    # then skip over it
+                    continue
+
                 event_search_rows.append((event_id, room_id, key, value))
 
             if isinstance(self.database_engine, PostgresEngine):