File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 2020from typing import Tuple
2121from typing import Union
2222from urllib .parse import parse_qs
23+ from urllib .parse import unquote_plus
2324from urllib .parse import urlparse
2425
2526import sqlparams
@@ -284,6 +285,15 @@ def _parse_url(url: str) -> Dict[str, Any]:
284285 if parts .scheme != 'singlestoredb' :
285286 out ['driver' ] = parts .scheme .lower ()
286287
288+ if out .get ('user' ):
289+ out ['user' ] = unquote_plus (out ['user' ])
290+
291+ if out .get ('password' ):
292+ out ['password' ] = unquote_plus (out ['password' ])
293+
294+ if out .get ('database' ):
295+ out ['database' ] = unquote_plus (out ['database' ])
296+
287297 # Convert query string to parameters
288298 out .update ({k .lower (): v [- 1 ] for k , v in parse_qs (parts .query ).items ()})
289299
You can’t perform that action at this time.
0 commit comments