Port final lab 4 validation and session revocation fixes
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user