8000 bug #20026 [Cache] Fixed password used to make the redis connection. … · symfony/symfony@23eee70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23eee70

Browse files
committed
bug #20026 [Cache] Fixed password used to make the redis connection. (ErikSaunier)
This PR was merged into the 3.1 branch. Discussion ---------- [Cache] Fixed password used to make the redis connection. | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20025 | License | MIT | Doc PR | http://symfony.com/blog/new-in-symfony-3-1-cache-component I do not know if it's possible to provide a test as `REDIS_HOST` is provided by Travis in [RedisAdapterTest.php](https://github.com/symfony/symfony/blob/3.1/src/Symfony/Component/Cache/Tests/Adapter/RedisAdapterTest.php). Commits ------- 77eea43 [Cache] Fix password used to make the redis connection.
2 parents b23389d + 77eea43 commit 23eee70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Cache/Adapter/RedisAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static function createConnection($dsn, array $options = array())
6969
if (0 !== strpos($dsn, 'redis://')) {
7070
throw new InvalidArgumentException(sprintf('Invalid Redis DSN: %s does not start with "redis://"', $dsn));
7171
}
72-
$params = preg_replace_callback('#^redis://(?:([^@]*)@)?#', function ($m) use (&$auth) {
72+
$params = preg_replace_callback('#^redis://(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) {
7373
if (isset($m[1])) {
7474
$auth = $m[1];
7575
}

0 commit comments

Comments
 (0)
0