The Wayback Machine - https://web.archive.org/web/20231128090649/https://github.com/symfony/symfony/pull/52758
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cache] Fix Couchbase password parsing #52758

Open
wants to merge 1 commit into
base: 5.4
Choose a base branch
from

Conversation

alexandre-daubois
Copy link
Contributor

@alexandre-daubois alexandre-daubois commented Nov 27, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Support for PHP 7.2 has been dropped with Couchbase 3.0.5.

This is the followup for #52688 (comment).

@@ -85,7 +85,7 @@ public static function createConnection($dsn, array $options = [])
preg_match($dsnPattern, $server, $matches);

$username = $matches['username'] ?: $username;
$password = $matches['password'] ?: $password;
$password = rawurldecode($matches['password'] ?: $password);
Copy link
Member

Choose a reason for hiding this comment

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

The issue in this class (and the other) is not only about the password - it's about all URL components.
The fix should involve using parse_url (as done in all other DSN parsers) to let PHP decode everything as needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the DSN parsing with parse_url 👍 I'll try to have a look at other adapters in a separate PR 👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants