summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/url.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-11-24 18:11:37 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-11-24 18:11:37 -0500
commit2800e34710672b408fa4a7bdd6d58d63a7128f04 (patch)
treea2108d949abe6cc97b8766b4b73022be30bb3318 /lib/sqlalchemy/engine/url.py
parent579f09974b4813f35fe0c701bbf678d5eccc4aeb (diff)
downloadsqlalchemy-2800e34710672b408fa4a7bdd6d58d63a7128f04.tar.gz
- The :func:`.create_engine` routine and the related
:func:`.make_url` function **no longer URL encode the password**. Database passwords that include characters like spaces, plus signs and anything else should now represent these characters directly, without any URL escaping. [ticket:2873]
Diffstat (limited to 'lib/sqlalchemy/engine/url.py')
-rw-r--r--lib/sqlalchemy/engine/url.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py
index 8f84ab039..28c15299e 100644
--- a/lib/sqlalchemy/engine/url.py
+++ b/lib/sqlalchemy/engine/url.py
@@ -67,8 +67,7 @@ class URL(object):
if self.username is not None:
s += self.username
if self.password is not None:
- s += ':' + ('***' if hide_password
- else util.quote_plus(self.password))
+ s += ':' + ('***' if hide_password else self.password)
s += "@"
if self.host is not None:
if ':' in self.host:
@@ -170,7 +169,7 @@ def _parse_rfc1738_args(name):
(?P<name>[\w\+]+)://
(?:
(?P<username>[^:/]*)
- (?::(?P<password>[^/]*))?
+ (?::(?P<password>.*))?
@)?
(?:
(?:
@@ -195,10 +194,6 @@ def _parse_rfc1738_args(name):
query = None
components['query'] = query
- if components['password'] is not None:
- components['password'] = \
- util.unquote_plus(components['password'])
-
ipv4host = components.pop('ipv4host')
ipv6host = components.pop('ipv6host')
components['host'] = ipv4host or ipv6host