From 585590bbd9d21d710afb85e45f70e5d14581e93a Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Thu, 25 Jun 2026 18:46:58 +0300 Subject: [PATCH] Protect against stream being rewound --- synapse/storage/databases/main/profile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/storage/databases/main/profile.py b/synapse/storage/databases/main/profile.py index 605bfacf3a..7c41c4562c 100644 --- a/synapse/storage/databases/main/profile.py +++ b/synapse/storage/databases/main/profile.py @@ -368,7 +368,7 @@ class ProfileWorkerStore(SQLBaseStore): Returns: list of tuples representing stream_id, user_id, action and field_name """ - if from_id == to_id: + if from_id >= to_id: return [] def _get_updated_profile_updates_txn( @@ -408,7 +408,7 @@ class ProfileWorkerStore(SQLBaseStore): Returns: list of ProfileUpdates update rows """ - if from_id == to_id: + if from_id >= to_id: return [] field_names = list(field_names) @@ -474,7 +474,7 @@ class ProfileWorkerStore(SQLBaseStore): Returns: A list of ProfileUpdates update rows. """ - if from_id == to_id: + if from_id >= to_id: return [] if len(field_names) == 0: