Fix persistent PDO hash key colliding on colon in credentials - #23354
Open
iliaal wants to merge 1 commit into
Open
Fix persistent PDO hash key colliding on colon in credentials#23354iliaal wants to merge 1 commit into
iliaal wants to merge 1 commit into
Conversation
iliaal
force-pushed
the
fix/pdo-persistent-hash-key
branch
from
August 18, 2026 13:37
9253038 to
4688203
Compare
devnexen
reviewed
Aug 18, 2026
The persistent handle key joined DSN, username, and password with unescaped colons, so distinct pairs such as admin/s:ecret and admin:s/ecret reused one connection. Length-prefix each field. Audited both ATTR_PERSISTENT encodings (boolean and user string key). No other PDO:DBH key builders; every driver uses this constructor.
iliaal
force-pushed
the
fix/pdo-persistent-hash-key
branch
from
August 18, 2026 19:15
4688203 to
f05bde7
Compare
Contributor
Author
|
Moved to On the NUL prefix, it predates the patch and the length prefix narrows it. Unpatched, mysqli goes in its own PR. (thanks Claude :-)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Persistent PDO built the connection cache key by joining DSN, username, and password with colons, so admin/s:ecret and admin:s/ecret reused one handle. Each field is now length-prefixed, including a string ATTR_PERSISTENT key.