summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/OCI.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup/OCI.php')
-rw-r--r--lib/private/Setup/OCI.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Setup/OCI.php b/lib/private/Setup/OCI.php
index 1da3656f9ab..7fddf0e58e5 100644
--- a/lib/private/Setup/OCI.php
+++ b/lib/private/Setup/OCI.php
@@ -63,12 +63,14 @@ class OCI extends AbstractDatabase {
public function setupDatabase($username) {
$e_host = addslashes($this->dbHost);
+ // adding slashes for security reasons
+ $e_port = addslashes($this->dbPort);
$e_dbname = addslashes($this->dbName);
//check if the database user has admin right
if ($e_host == '') {
$easy_connect_string = $e_dbname; // use dbname as easy connect name
} else {
- $easy_connect_string = '//'.$e_host.'/'.$e_dbname;
+ $easy_connect_string = '//'.$e_host.(!empty($e_port) ? ":{$e_port}" : "").'/'.$e_dbname;
}
$this->logger->debug('connect string: ' . $easy_connect_string, ['app' => 'setup.oci']);
$connection = @oci_connect($this->dbUser, $this->dbPassword, $easy_connect_string);