Skip to content

Fix/session flash key collision#121

Merged
benkhalife merged 4 commits into
masterfrom
fix/session-flash-key-collision
Jul 1, 2026
Merged

Fix/session flash key collision#121
benkhalife merged 4 commits into
masterfrom
fix/session-flash-key-collision

Conversation

@benkhalife

Copy link
Copy Markdown
Member

No description provided.

…n with Flash

Session::flash()/getFlash() used the literal key '_flash_old' to
track its own flash-aging state, colliding with Flash::withInput()'s
use of the same key and silently wiping old input on the next request.
Replaces the removed Session::flash()/getFlash(). Uses a namespaced
session key (_flash_data_{key}) so it can never collide with other
Flash data or plain Session keys.
… key collision

Regression test reproduces the original bug: Flash::withInput()
followed by a Session::start() on the "next request" used to wipe
the stored input before old() could read it.

@benkhalife benkhalife left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@benkhalife
benkhalife merged commit 0170cd4 into master Jul 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant