Skip to content

Commit 8c5d8cc

Browse files
authored
fix(http): gracefully recover from corrupt session retrieval (#1687)
1 parent 7ecd308 commit 8c5d8cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/http/src/Session/Managers/FileSessionManager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public function isValid(SessionId $id): bool
6262
return false;
6363
}
6464

65+
if (! ($session->lastActiveAt ?? null)) {
66+
return false;
67+
}
68+
6569
return $this->clock->now()->before(
6670
other: $session->lastActiveAt->plus($this->sessionConfig->expiration),
6771
);

0 commit comments

Comments
 (0)