From ec1af314c23b6be86062532447d4a0cbe1dc8659 Mon Sep 17 00:00:00 2001 From: Vesperia Art Date: Thu, 6 Jun 2024 17:27:42 -0400 Subject: [PATCH] Update redis.config.php (#2232) Correctly set the redis password config from the REDIS_HOST_PASSWORD_FILE environment variable. Fix an issue similar to #1402 when using the REDIS_HOST_PASSWORD_FILE environment variable to provide the redis host secret. Signed-off-by: Vesperia Art --- .config/redis.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/redis.config.php b/.config/redis.config.php index a5fde3c7..346457c5 100644 --- a/.config/redis.config.php +++ b/.config/redis.config.php @@ -5,7 +5,7 @@ if (getenv('REDIS_HOST')) { 'memcache.locking' => '\OC\Memcache\Redis', 'redis' => array( 'host' => getenv('REDIS_HOST'), - 'password' => (string) getenv('REDIS_HOST_PASSWORD'), + 'password' => getenv('REDIS_HOST_PASSWORD_FILE') && file_exists(getenv('REDIS_HOST_PASSWORD_FILE')) ? trim(file_get_contents(getenv('REDIS_HOST_PASSWORD_FILE'))) : (string) getenv('REDIS_HOST_PASSWORD'), ), );