Commit c365648
committed
[Cache] Fix authenticating to the master when using Redis Sentinel
In Sentinel mode, credentials taken from the DSN userinfo are meant for the
master connection, while the "auth" query parameter or option is meant for the
Sentinel handshake. Both were read from the same resolved value, so the userinfo
was dropped for Predis and for phpredis below 6, and the master connection was
attempted without credentials.
This aligns 6.4 with the behavior of 7.4.1 parent 0cb81e0 commit c365648Copy full SHA for c365648
2 files changed
+187-8Lines changed: 187 additions & 8 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src/Symfony/Component/Cache
- Tests/Traits
- Traits
Expand file treeCollapse file tree
Open diff view settings
Collapse file
src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php+155Lines changed: 155 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
210 | 210 | |
211 | 211 | |
212 | 212 | |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
| 299 | + |
| 300 | + |
| 301 | + |
| 302 | + |
| 303 | + |
| 304 | + |
| 305 | + |
| 306 | + |
| 307 | + |
| 308 | + |
| 309 | + |
| 310 | + |
| 311 | + |
| 312 | + |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
| 318 | + |
| 319 | + |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
| 330 | + |
| 331 | + |
| 332 | + |
| 333 | + |
| 334 | + |
| 335 | + |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
| 341 | + |
| 342 | + |
| 343 | + |
| 344 | + |
| 345 | + |
| 346 | + |
| 347 | + |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
| 353 | + |
| 354 | + |
| 355 | + |
| 356 | + |
| 357 | + |
| 358 | + |
| 359 | + |
| 360 | + |
| 361 | + |
| 362 | + |
| 363 | + |
| 364 | + |
| 365 | + |
| 366 | + |
| 367 | + |
213 | 368 | |
Collapse file
src/Symfony/Component/Cache/Traits/RedisTrait.php
Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Traits/RedisTrait.php+32-8Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
194 | 194 | |
195 | 195 | |
196 | 196 | |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
| 197 | + |
201 | 198 | |
202 | 199 | |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
203 | 209 | |
204 | 210 | |
205 | 211 | |
| ||
234 | 240 | |
235 | 241 | |
236 | 242 | |
237 | | - |
| 243 | + |
238 | 244 | |
239 | 245 | |
240 | 246 | |
241 | 247 | |
242 | 248 | |
243 | 249 | |
244 | | - |
| 250 | + |
245 | 251 | |
246 | 252 | |
247 | 253 | |
| ||
264 | 270 | |
265 | 271 | |
266 | 272 | |
267 | | - |
| 273 | + |
268 | 274 | |
269 | 275 | |
270 | 276 | |
| ||
273 | 279 | |
274 | 280 | |
275 | 281 | |
276 | | - |
| 282 | + |
277 | 283 | |
278 | 284 | |
279 | 285 | |
| ||
405 | 411 | |
406 | 412 | |
407 | 413 | |
| 414 | + |
| 415 | + |
| 416 | + |
| 417 | + |
| 418 | + |
| 419 | + |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
| 431 | + |
408 | 432 | |
409 | 433 | |
410 | 434 | |
|
0 commit comments