From 94ca3abefc682c74be26b51404ee9061bea61dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Fri, 21 Jun 2019 22:07:37 +0200 Subject: [PATCH] Fixes Cacheops with a password protected redis As per the [`README.rst`][1] of `django-cacheops`, if a password is added to the connection string, it must be in the form `redis://:password@host:port/db`. Notice the colon, which was missing from the implementation in [`settings.py`][2]. [1]: https://github.com/Suor/django-cacheops/blob/8ad970d55a3782fbaa027332dcc4ae1ee8c41437/README.rst [2]: https://github.com/digitalocean/netbox/blob/86d5b48007a514e0c7968c9711fed5ede0a78f6c/netbox/netbox/settings.py#L349 --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 0157e2560..d6fd90c93 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -346,7 +346,7 @@ else: REDIS_CACHE_CON_STRING = 'redis://' if REDIS_PASSWORD: - REDIS_CACHE_CON_STRING = '{}{}@'.format(REDIS_CACHE_CON_STRING, REDIS_PASSWORD) + REDIS_CACHE_CON_STRING = '{}:{}@'.format(REDIS_CACHE_CON_STRING, REDIS_PASSWORD) REDIS_CACHE_CON_STRING = '{}{}:{}/{}'.format(REDIS_CACHE_CON_STRING, REDIS_HOST, REDIS_PORT, REDIS_CACHE_DATABASE)