From b1b9ed8c72c3bc007d20cb2e42668f27b947b7f8 Mon Sep 17 00:00:00 2001 From: Arthur Tabbal Date: Fri, 17 May 2024 15:59:01 -0300 Subject: [PATCH] Encode passwords with urrlib.parse.quote --- app/resources/connections.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/resources/connections.py b/app/resources/connections.py index 71e6290..afb1954 100644 --- a/app/resources/connections.py +++ b/app/resources/connections.py @@ -1,5 +1,6 @@ from dotenv import load_dotenv from sqlalchemy import URL, create_engine +from urllib.parse import quote import os # Get env variables @@ -12,7 +13,7 @@ DATABASE = os.getenv("DB_DATABASE") PORT = os.getenv("DB_PORT") USER = os.getenv("DB_USER") -PASS = os.getenv("DB_PASS") +PASS = quote(os.getenv("DB_PASS")) # Pool parameters POOL_SIZE = os.getenv("POOL_SIZE")