Commit 6d95721
committed
bug #62852 [Cache] Fix DSN auth not passed to clusters in RedisTrait (wikando-ck)
This PR was squashed before being merged into the 6.4 branch.
Discussion
----------
[Cache] Fix DSN auth not passed to clusters in RedisTrait
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | #62765
| License | MIT
This fix enables `symfony/cache` Redis-type cluster connections to use authentication from DSN.
The cluster connections use `$params['auth']` instead of `$auth` in `RedisTrait::createConnection()`.
The values that are extracted from the DSN in `$auth` are never merged into the `$params`.
As this is a trait that is used in a connection factory, it's impossible to unit-test this.
It can be reproduced with a redis-cluster that has no default-user or that has a password protected default user and then connecting to it using a DSN like `rediss://user:pass@redis-cluster:6379`.
I've just tested it on an aws memoryDb cluster.
Here's my research thread using deepwiki:
https://deepwiki.com/search/in-redistraitphp-why-is-params_8008d228-37f0-42cb-8e6c-74a2c419d33a?mode=fast
(note how it fails telling me which branch to target 🔢)
Commits
-------
2149f6a [Cache] Fix DSN auth not passed to clusters in RedisTrait1 file changed
Lines changed: 13 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
220 | | - | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
232 | | - | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| |||
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
284 | | - | |
| 287 | + | |
285 | 288 | | |
286 | 289 | | |
287 | 290 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | | - | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| |||
389 | 392 | | |
390 | 393 | | |
391 | 394 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
400 | 401 | | |
401 | 402 | | |
402 | 403 | | |
| |||
0 commit comments