diff options
author | Brice Maron <brice@bmaron.net> | 2012-07-04 10:13:00 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-07-04 10:13:00 +0000 |
commit | 3b09aa8578702a403e06e6359a19013b573443bc (patch) | |
tree | 18ccf5ac5486b49241fc2f6b10865b5f6149db77 /lib/db.php | |
parent | 799e34acd4a73b31a6b2f5fa8f4de3c3557763a8 (diff) | |
download | nextcloud-server-3b09aa8578702a403e06e6359a19013b573443bc.tar.gz nextcloud-server-3b09aa8578702a403e06e6359a19013b573443bc.zip |
Correct Postgresql connection with space in password. Work around php bug
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/db.php b/lib/db.php index ffa0d37307a..2a06d72ea32 100644 --- a/lib/db.php +++ b/lib/db.php @@ -128,6 +128,14 @@ class OC_DB { }else{ $dsn='pgsql:dbname='.$name.';host='.$host; } + /** + * Ugly fix for pg connections pbm when password use spaces + */ + $e_user = addslashes($user); + $e_password = addslashes($pass); + $pass = $user = null; + $dsn .= ";user='$e_user';password='$e_password'"; + /** END OF FIX***/ break; } try{ |