0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-10-30 11:18:54 +01:00

Limit max number of SQL vars

This commit is contained in:
Erik Johnston 2015-10-22 13:25:22 +01:00
parent 1fc2d11a14
commit ba02bba88c

View file

@ -36,6 +36,8 @@ class SearchStore(SQLBaseStore):
clauses = []
args = []
# Make sure we don't explode because the person is in too many rooms.
if len(room_ids) > 500:
clauses.append(
"room_id IN (%s)" % (",".join(["?"] * len(room_ids)),)
)