Thread: [SQL-CVS] [ sqlobject-Bugs-1426574 ] Database passwords with '@' don't parse correctly.
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: SourceForge.net <no...@so...> - 2006-02-07 20:43:32
|
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 |
From: SourceForge.net <no...@so...> - 2006-02-07 20:45:41
|
Bugs item #1426574, was opened at 2006-02-07 12:43 Message generated for change (Comment added) made by nobody 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... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-02-07 12: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 |