diff options
author | alecpl <alec@alec.pl> | 2012-03-06 13:38:33 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-03-06 13:38:33 +0000 |
commit | 4da69b953e7a3b6f83be2406bb2f0b8196d63c08 (patch) | |
tree | f6a228b8f3aa41d8c1fde726b6b5c13441d8e9f6 /program/lib | |
parent | 0203f16312bc949a5cf46ce90fa43de9119e23a8 (diff) |
- Have DSN parser pass database name through url decode (#1488035)
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/MDB2.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/lib/MDB2.php b/program/lib/MDB2.php index 4c0660218..61486a60c 100644 --- a/program/lib/MDB2.php +++ b/program/lib/MDB2.php @@ -888,10 +888,10 @@ class MDB2 if ($dsn) { // /database if (($pos = strpos($dsn, '?')) === false) { - $parsed['database'] = $dsn; + $parsed['database'] = rawurldecode($dsn); // /database?param1=value1¶m2=value2 } else { - $parsed['database'] = substr($dsn, 0, $pos); + $parsed['database'] = rawurldecode(substr($dsn, 0, $pos)); $dsn = substr($dsn, $pos + 1); if (strpos($dsn, '&') !== false) { $opts = explode('&', $dsn); |