Skip to content

Password not working with an unix socket for Messenger redis transport #47393

@Arakmar

Description

@Arakmar

Symfony version(s) affected

6.1.3, 5.4.11

Description

When a messenger async transport is configured with Redis (unix socket with a password), it gives DSN parsing errors.
After looking at the code, the password is properly parsed only when a host is used.
It's also the same for the password option, it's not used in case of a socket.

The redis cache adapter doesn't seem to be affected by this problem. It allows DSN like that :
redis[s]://[pass@][ip|host|socket[:port]][/db-index]

How to reproduce

Use a DSN like that for an async messenger queue :
redis://password@/var/run/redis.sock

It gives the following error :

The given Redis DSN is invalid

Possible Solution

Add support for passwords with redis socket in the same way the redis cache adapter does.

I can propose a PR for that.

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