Correct Postgresql connection with space in password. Work around php bug
This commit is contained in:
parent
799e34acd4
commit
3b09aa8578
1 changed files with 8 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue