Skip to content

Fix: Move debug log before session destroy to capture session details.#1389

Open
abhinav-1050 wants to merge 1 commit intoopenware:2-6-stablefrom
abhinav-1050:fix/session-mismatch-log
Open

Fix: Move debug log before session destroy to capture session details.#1389
abhinav-1050 wants to merge 1 commit intoopenware:2-6-stablefrom
abhinav-1050:fix/session-mismatch-log

Conversation

@abhinav-1050
Copy link

Why
The session mismatch log was not showing session details because session.destroy was executed before the Rails.logger.debug statement. This caused the session data to be unavailable in the logs, making debugging difficult.

What changed

Moved the Rails.logger.debug statement above the session.destroy call in validate_session!.

Ensures that session details (user agent, expiration time, IP) are logged before the session is cleared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant