File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
synapse/storage/databases/main Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2009,7 +2009,12 @@ def _get_sliding_sync_insert_values_from_state_map(
2009
2009
EventContentFields .TOMBSTONE_SUCCESSOR_ROOM
2010
2010
)
2011
2011
# Scrutinize JSON values
2012
- if successor_room_id is None or isinstance (successor_room_id , str ):
2012
+ if successor_room_id is None or (
2013
+ isinstance (successor_room_id , str )
2014
+ # We ignore values with null bytes as Postgres doesn't allow them in
2015
+ # text columns.
2016
+ and "\0 " not in room_name
2017
+ ):
2013
2018
sliding_sync_insert_map ["tombstone_successor_room_id" ] = (
2014
2019
successor_room_id
2015
2020
)
@@ -2121,6 +2126,12 @@ def _get_sliding_sync_insert_values_from_stripped_state(
2121
2126
else None
2122
2127
)
2123
2128
2129
+ if (
2130
+ sliding_sync_insert_map ["tombstone_successor_room_id" ] is not None
2131
+ and "\0 " in sliding_sync_insert_map ["tombstone_successor_room_id" ]
2132
+ ):
2133
+ sliding_sync_insert_map .pop ("tombstone_successor_room_id" )
2134
+
2124
2135
else :
2125
2136
# No stripped state provided
2126
2137
sliding_sync_insert_map ["has_known_state" ] = False
You can’t perform that action at this time.
0 commit comments