Skip to content

Commit 497be1f

Browse files
committed
minor #7739 Added a note about using ":" in Redis passwords (javiereguiluz)
This PR was merged into the 3.2 branch. Discussion ---------- Added a note about using ":" in Redis passwords This fixes #7531. Commits ------- 9de2e8c Added a note about using ":" in Redis passwords
2 parents fee51ea + 9de2e8c commit 497be1f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/cache/cache_pools.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ helper allows creating a connection to a Redis server using a DSN configuration:
129129

130130
See the method's docblock for more options.
131131

132+
.. caution::
133+
134+
Redis connections don't support login + password credentials, but just a
135+
password. This can produce undesired effects when the password contains a
136+
``:`` character (e.g. ``foo:bar`` password would be wrongly parsed as ``foo``
137+
login + ``bar`` password). The solution is to add a fake login to the
138+
connection DSN. Instead of ``'redis://foo:bar@localhost'``, use
139+
``'redis://__ignore_this__:foo:bar@localhost'``
140+
132141
PDO & Doctrine DBAL Cache Adapter
133142
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134143

0 commit comments

Comments
 (0)