Bugs item #1426574, was opened at 2006-02-07 12:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1426574&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Database passwords with '@' don't parse correctly.
Initial Comment:
As the title says, if your database password contains
an '@' character, then the connection string is parsed
incorrectly. To remidy this, I've used host.rfind('@')
instead of host.find('@'). A patch for this would look
something like (I hope the indentation works):
dbconnection.py.ORIG dbconnection.py
94,99c94,102
< if host and host.find('@') != -1:
< user, host = host.split('@', 1)
< if user.find(':') != -1:
< user, password = user.split(':', 1)
< else:
< password = None
---
> if host:
> at = host.rfind('@')
> if at != -1:
> user = host[:at]
> host = host[at+1:]
> if user.find(':') != -1:
> user, password = user.split(':', 1)
> else:
> password = None
gk...@gm...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1426574&group_id=74338
|