lifecycle: fix password and hostname not properly quoted

#2623
This commit is contained in:
Jens Langhammer 2022-03-31 16:37:54 +00:00
parent 8689444954
commit 4cf00ed5cf
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ from json import dumps
from sys import exit as sysexit
from sys import stderr
from time import sleep, time
from urllib.parse import quote_plus
from psycopg2 import OperationalError, connect
from redis import Redis
@ -58,7 +59,7 @@ if CONFIG.y_bool("redis.tls", False):
REDIS_PROTOCOL_PREFIX = "rediss://"
REDIS_URL = (
f"{REDIS_PROTOCOL_PREFIX}:"
f"{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:"
f"{quote_plus(CONFIG.y('redis.password'))}@{quote_plus(CONFIG.y('redis.host'))}:"
f"{int(CONFIG.y('redis.port'))}/{CONFIG.y('redis.ws_db')}"
)
while True: