Skip to content

[Cache] The RedisTrait DSN parsing doesn't urldecode the params #52420

Closed
@maelanleborgne

Description

@maelanleborgne

Symfony version(s) affected

5.4

Description

The RedisTrait doesn't urldecode the username/password/host when creating the connection from the dsn. In most other components, params are decoded (in the Mailer for example). That makes it hard to use special chars.
It would be easy enough to fix this but I'm affraid this would impact users that have character sequences that match url-encoded signs (for instance a raw password password%3D would be converted to password=).

Is this something we could fit in 7.0 ?

How to reproduce

Use redis with a password containing à @ char.
Using no encoding the parsing will be wrong
redis://user:p@ssword@localhost
If encoded the auth will fail
redis://user:p%40assword@localhost

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions