From 39d920682aa292e24a69a2a9928c7dafd9eaa029 Mon Sep 17 00:00:00 2001 From: James Allen Date: Fri, 17 Jun 2016 14:11:22 +0100 Subject: [PATCH] Only pass through keys to redis that are explicitly set in the config --- services/document-updater/app/coffee/RedisBackend.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/document-updater/app/coffee/RedisBackend.coffee b/services/document-updater/app/coffee/RedisBackend.coffee index 6a8e817d8c..8df988faba 100644 --- a/services/document-updater/app/coffee/RedisBackend.coffee +++ b/services/document-updater/app/coffee/RedisBackend.coffee @@ -113,8 +113,11 @@ module.exports = rclient = new Redis.Cluster(config.cluster) driver = "ioredis" else - {host, port, password, endpoints, masterName} = config - rclient = require("redis-sharelatex").createClient({host, port, password, endpoints, masterName}) + redis_config = {} + for key in ["host", "port", "password", "endpoints", "masterName"] + if config[key]? + redis_config[key] = config[key] + rclient = require("redis-sharelatex").createClient(redis_config) driver = "redis" return { rclient: rclient