Opened 9 years ago
Closed 8 years ago
#12409 closed defect (worksforme)
The $ character must be URL encoded if used as a database password
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | database backend | Version: | |
Severity: | normal | Keywords: | mysql |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
TracEnvironment#DatabaseConnectionStrings lists 3 characters that must be URL encoded when used as a database password. I've found that $
must also be URL encoded (Trac 1.0.10).
I found this by trial and error. It's not clear to me why $
needs to be encoded.
>>> from trac.db.api import _parse_db_str >>> p = _parse_db_str('mysql://tracuser:the$_$password@localhost:3306/trac') >>> print(p[1]['password']) the$_$password
Attachments (1)
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Yeah, it's very strange behavior to see on this server. The server on which I did the SQLite to MySQL migration currently has an encoded value for $
in the database connection string password: %24
. It's the only way I could get Trac to connect to the database. When connecting with the MySQL client I use $
in the password.
I will try to reproduce locally.
This is CentOS 6:
$ mysql --version mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
by , 8 years ago
Attachment: | Screen Shot 2016-08-30 at 12.09.25.png added |
---|
comment:3 by , 8 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Works for me….