From d9180b08191ff3b5bcfefa902b4bdfdc4c4f87c4 Mon Sep 17 00:00:00 2001 From: ChrisRibe Date: Fri, 12 Jul 2024 11:53:21 -0400 Subject: [PATCH] Update db_url.py Fixed issue where split would also split passwords containing `?` So limiting the split to only 1 --- playhouse/db_url.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playhouse/db_url.py b/playhouse/db_url.py index 7176c806d..5e704f0ce 100644 --- a/playhouse/db_url.py +++ b/playhouse/db_url.py @@ -39,7 +39,8 @@ def parseresult_to_dict(parsed, unquote_password=False): # urlparse in python 2.6 is broken so query will be empty and instead # appended to path complete with '?' - path_parts = parsed.path[1:].split('?') + # Splitting on the first '?' only to avoid splitting passwords that contain '?' + path_parts = parsed.path[1:].split('?', 1) try: query = path_parts[1] except IndexError: