Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Unable to specify password with special chars in DSN #652

Copy link
Copy link
@jeff1985

Description

@jeff1985
Issue body actions

With the recent change and introduction of enqueue/dsn (https://github.com/php-enqueue/dsn/blob/master/Dsn.php) I'm not able to specify a password with special chars in the DSN string. Before I was using it with the following syntax:

rediss://hostname?timeout=10&pass=XXXX%2Fs%3D

I'm using a major cloud provider for the redis resource, the password is auto-generated and always contains special chars. Before I was using urlencode to pass the special chars as parameter and it was working fine.

Now as I see, I have to specify the password in the "user:pass@host" syntax, so it would be something like this:

rediss://user:XXXX%2Fs%3D@hostname?timeout=10
  1. How can I leave out the user? I dont have a user for the connection. Only a "key"=password.
  2. If done like this, the password will not be decoded, and the server will report failed authentication.
  3. I also can not pass the password as is, because then parse_url is not able to parse it at all!

Easy to verify:

php > echo parse_url("rediss://user:XXXX%2Fs%3D@host.com/", PHP_URL_PASS);
XXXX%2Fs%3D
php > echo parse_url("rediss://user:XXXX".urldecode("%2Fs%3D")."@host.com/", PHP_URL_PASS);
php >
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.