change display names/avatar URLS to None if they contain null bytes
This commit is contained in:
parent
e81fa92648
commit
fdb5ce2ffa
|
@ -1641,7 +1641,7 @@ class PersistEventsStore:
|
|||
"""Store a room member in the database."""
|
||||
|
||||
def str_or_none(val: Any) -> Optional[str]:
|
||||
return val if isinstance(val, str) else None
|
||||
return val if isinstance(val, str) and "\u0000" not in val else None
|
||||
|
||||
self.db_pool.simple_insert_many_txn(
|
||||
txn,
|
||||
|
|
Loading…
Reference in a new issue