Port final lab 4 validation and session revocation fixes

This commit is contained in:
Artyom
2026-11-06 22:33:31 +03:00
parent f88e9ba43c
commit 0e92111661
47 changed files with 5097 additions and 32 deletions
@@ -166,10 +166,12 @@ class PostgresSessionDirectory:
async with self._database.session() as session:
row = (
await session.execute(
select(SessionRow).where(
select(SessionRow)
.where(
SessionRow.token_hash == token_hash,
SessionRow.expires_at > now,
)
.with_for_update(read=True, key_share=True)
)
).scalar_one_or_none()
if row is None: