From 8b7f6992c1d2313bafdab90ef6470b87a0156e87 Mon Sep 17 00:00:00 2001 From: Gary PEGEOT Date: Tue, 10 May 2022 12:07:23 +0200 Subject: [PATCH] [Cache] [Redis] Fix ignored username --- src/Symfony/Component/Cache/Traits/RedisTrait.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index efff27296628d..84a16a33e23ff 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -103,13 +103,17 @@ public static function createConnection($dsn, array $options = []) throw new CacheException(sprintf('Cannot find the "redis" extension nor the "predis/predis" package: "%s".', $dsn)); } - $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { + $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { if (isset($m[2])) { $auth = $m[2]; if ('' === $auth) { $auth = null; } + + if (strpos($auth, ':')) { + $auth = explode(':', $auth, 2); + } } return 'file:'.($m[1] ?? ''); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy