Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 8505a4d

Browse files
committed
Merge pull request #441 from matrix-org/markjh/fts_skip_invalid
Skip events that where the body, name or topic isn't a string
2 parents 6051266 + 98dfa7d commit 8505a4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

synapse/storage/search.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ def reindex_search_txn(txn):
8585
# skip over it.
8686
continue
8787

88+
if not isinstance(value, basestring):
89+
# If the event body, name or topic isn't a string
90+
# then skip over it
91+
continue
92+
8893
event_search_rows.append((event_id, room_id, key, value))
8994

9095
if isinstance(self.database_engine, PostgresEngine):

0 commit comments

Comments
 (0)