mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-26 06:49:26 -05:00
Fix missing null character check on guest_access room state (#8373)
When updating the `room_stats_state` table, we try to check for null bytes slipping in to the content for state events. It turns out we had added `guest_access` as a field to room_stats_state without including it in the null byte check. Lo and behold, a null byte in a `m.room.guest_access` event then breaks `room_stats_state` updates. This PR adds the check for `guest_access`.
This commit is contained in:
commit
4bb203ea4f
1
changelog.d/8373.bugfix
Normal file
1
changelog.d/8373.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Include `guest_access` in the fields that are checked for null bytes when updating `room_stats_state`. Broke in v1.7.2.
|
@ -210,6 +210,7 @@ class StatsStore(StateDeltasStore):
|
||||
* topic
|
||||
* avatar
|
||||
* canonical_alias
|
||||
* guest_access
|
||||
|
||||
A is_federatable key can also be included with a boolean value.
|
||||
|
||||
@ -234,6 +235,7 @@ class StatsStore(StateDeltasStore):
|
||||
"topic",
|
||||
"avatar",
|
||||
"canonical_alias",
|
||||
"guest_access",
|
||||
):
|
||||
field = fields.get(col, sentinel)
|
||||
if field is not sentinel and (not isinstance(field, str) or "\0" in field):
|
||||
|
Loading…
Reference in New Issue
Block a user