summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-03-06 13:38:33 +0000
committeralecpl <alec@alec.pl>2012-03-06 13:38:33 +0000
commit4da69b953e7a3b6f83be2406bb2f0b8196d63c08 (patch)
treef6a228b8f3aa41d8c1fde726b6b5c13441d8e9f6
parent0203f16312bc949a5cf46ce90fa43de9119e23a8 (diff)
- Have DSN parser pass database name through url decode (#1488035)
-rw-r--r--program/lib/MDB2.php4
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&param2=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);