Skip to content

Commit ec1af31

Browse files
authored
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 <vesperiaart@gmail.com>
1 parent 5fdeb7b commit ec1af31

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.config/redis.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'memcache.locking' => '\OC\Memcache\Redis',
66
'redis' => array(
77
'host' => getenv('REDIS_HOST'),
8-
'password' => (string) getenv('REDIS_HOST_PASSWORD'),
8+
'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'),
99
),
1010
);
1111

0 commit comments

Comments
 (0)