PMCORE-646 Special characters in oracle connection passwords causes bad behavior

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-05-06 23:38:00 -04:00
parent 5bd2d6f1ec
commit 0b1ec05f67
3 changed files with 102 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ include_once 'creole/Connection.php';
@ini_set('track_errors', true);
use ProcessMaker\Core\System;
/**
* This is the class that manages the database drivers.
*
@@ -309,6 +311,10 @@ class Creole {
);
$info = parse_url($dsn);
if ($info === false) {
$info = System::parseUrlWithNotEncodedPassword($dsn);
}
$info['pass'] = urldecode($info['pass']);
if (count($info) === 1) { // if there's only one element in result, then it must be the phptype
$parsed['phptype'] = array_pop($info);