diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-24 08:29:33 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-24 08:29:33 +0000 |
commit | ba0219e4039776a724d9d22cf7bec06e0d37e3ab (patch) | |
tree | 3d3872dc896cdb3a98a9d396b8c8c318b4f3400c /includes/database.pgsql.inc | |
parent | 576399c1f466ed2d078fb176107dab36d31b405d (diff) | |
download | brdo-ba0219e4039776a724d9d22cf7bec06e0d37e3ab.tar.gz brdo-ba0219e4039776a724d9d22cf7bec06e0d37e3ab.tar.bz2 |
- Patch #21719 by rkerr: made db passwords with special characters work.
Diffstat (limited to 'includes/database.pgsql.inc')
-rw-r--r-- | includes/database.pgsql.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc index 8375c6366..1bc2bf278 100644 --- a/includes/database.pgsql.inc +++ b/includes/database.pgsql.inc @@ -32,6 +32,12 @@ function db_connect($url) { $url = parse_url($url); + // Decode url-encoded information in the db connection string + $url['user'] = urldecode($url['user']); + $url['pass'] = urldecode($url['pass']); + $url['host'] = urldecode($url['host']); + $url['path'] = urldecode($url['path']); + $conn_string = ' user='. $url['user'] .' dbname='. substr($url['path'], 1) .' password='. $url['pass'] . ' host=' . $url['host']; $conn_string .= isset($url['port']) ? ' port=' . $url['port'] : ''; |