-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(redis): Apply patch to fix redis acl connection
- Loading branch information
1 parent
4b43c46
commit 23b85a6
Showing
11 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php | ||
index 518a563..c767330 100644 | ||
--- a/vendor/symfony/cache/Traits/RedisTrait.php | ||
+++ b/vendor/symfony/cache/Traits/RedisTrait.php | ||
@@ -105,9 +105,13 @@ trait RedisTrait | ||
throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.'); | ||
} | ||
|
||
- $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { | ||
- if (isset($m[2])) { | ||
- $auth = rawurldecode($m[2]); | ||
+ $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:(?<user>[^:@]*+):)?(?<password>[^@]*+)@)?#', function ($m) use (&$auth) { | ||
+ if (isset($m['password'])) { | ||
+ if (\in_array($m['user'], ['', 'default'], true)) { | ||
+ $auth = $m['password']; | ||
+ } else { | ||
+ $auth = [$m['user'], $m['password']]; | ||
+ } | ||
|
||
if ('' === $auth) { | ||
$auth = null; | ||
@@ -376,7 +380,13 @@ trait RedisTrait | ||
$params['parameters']['database'] = $params['dbindex']; | ||
} | ||
if (null !== $auth) { | ||
- $params['parameters']['password'] = $auth; | ||
+ if (\is_array($auth)) { | ||
+ // ACL | ||
+ $params['parameters']['username'] = $auth[0]; | ||
+ $params['parameters']['password'] = $auth[1]; | ||
+ } else { | ||
+ $params['parameters']['password'] = $auth; | ||
+ } | ||
} | ||
|
||
if (isset($params['ssl'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches) | ||
Patches applied to this directory: | ||
|
||
Fix auth connection in RedisTrait | ||
Source: patches/symfony-redis-cache-auth.patch | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters