Skip to content

Commit

Permalink
Update redis.config.php (#2232)
Browse files Browse the repository at this point in the history
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 <vesperiaart@gmail.com>
  • Loading branch information
VesperiaArt authored Jun 6, 2024
1 parent 5fdeb7b commit ec1af31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .config/redis.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'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'),
),
);

Expand Down

0 comments on commit ec1af31

Please sign in to comment.