← Back to sandbox
Backend & API Intermediate 4 possible tests

Session State & Persistence

Save data to session, then log out. One logout endpoint leaves the session intact. The other properly flushes it. Find which logout is broken — and verify by reading the session afterwards.

What is this?

Session fixation and improper session invalidation are common auth bugs. When a user logs out, the server must call session.flush() to destroy the session data and regenerate the session ID. Skipping this step means an attacker who obtained the session cookie can still access the account.

What is hidden here

SetupSave a name to the session
BugLogout (buggy) — session is NOT flushed, data still readable after "logout"
CorrectLogout (correct) — session is flushed, data is gone
VerifyRead session after logout to confirm which behaviour occurred

Session Manager


Session Data
Suggested Test Inputs
  • Save data to session, then use Logout (Buggy) and try to read the session
  • Does the data still exist after logout?
  • Repeat with Logout (Correct) and verify the session is cleared