fix(acl): keep the session replay watermark monotonic

This commit is contained in:
agessaman
2026-07-16 22:42:34 -07:00
parent 1687c299d1
commit 90eb3cae07
2 changed files with 27 additions and 1 deletions
+4 -1
View File
@@ -64,7 +64,10 @@ class ACL:
sync_since: int = None,
) -> None:
now = int(time.time())
client.last_timestamp = timestamp
# Monotonic: the replay watermark must never move backwards, even if
# another accepted request advanced it between the replay check and
# this write.
client.last_timestamp = max(client.last_timestamp, timestamp)
client.last_activity = now
client.last_login_success = now
client.shared_secret = shared_secret