Bugs item #1426574, was opened at 2006-02-07 23:43
Message generated for change (Comment added) made by phd
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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Oleg Broytmann (phd)
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...
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2006-08-29 18:23
Message:
Logged In: YES
user_id=4799
Fixed in the revision 1887 in the trunk, rev. 1888 in the
0.7-branch.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2006-02-07 23:45
Message:
Logged In: NO
Doesn't look like the indentation worked, but it should be
easy to see that rather than using the split function, use
the reverse find() to split the string.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=1426574&group_id=74338
|