summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-12-14 14:42:35 +0000
committerMark Haines <mjark@negativecurvature.net>2015-12-14 14:42:35 +0000
commit8505a4ddc36a3ba84c5cb5c94f25bf32d4ae9b4e (patch)
tree6c649d027c0cb4bb9f551d37716b8b4d493e0c69
parentMerge pull request #442 from matrix-org/markjh/missing_prev_content (diff)
parentSkip events that where the body, name or topic isn't a string when back popul... (diff)
downloadsynapse-8505a4ddc36a3ba84c5cb5c94f25bf32d4ae9b4e.tar.xz
Merge pull request #441 from matrix-org/markjh/fts_skip_invalid
Skip events that where the body, name or topic isn't a string 
Diffstat (limited to '')
-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):