We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450073e commit d3d9867Copy full SHA for d3d9867
cosmotech/coal/utils/postgresql.py
@@ -9,6 +9,7 @@
9
from pyarrow import Table
10
import pyarrow as pa
11
from typing import Optional
12
+from urllib.parse import quote
13
from cosmotech.coal.utils.logger import LOGGER
14
15
@@ -18,9 +19,12 @@ def generate_postgresql_full_uri(
18
19
postgres_db: str,
20
postgres_user: str,
21
postgres_password: str, ) -> str:
22
+ # Check if password needs percent encoding (contains special characters)
23
+ # We don't log anything about the password for security
24
+ encoded_password = quote(postgres_password, safe='')
25
return ('postgresql://' +
26
f'{postgres_user}'
- f':{postgres_password}'
27
+ f':{encoded_password}'
28
f'@{postgres_host}'
29
f':{postgres_port}'
30
f'/{postgres_db}')
0 commit comments