diff --git a/lifecycle/wait_for_db.py b/lifecycle/wait_for_db.py index 7088f070f..bc880c3db 100755 --- a/lifecycle/wait_for_db.py +++ b/lifecycle/wait_for_db.py @@ -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: