summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/PostgreSQL.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup/PostgreSQL.php')
-rw-r--r--lib/private/Setup/PostgreSQL.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php
index 35d8b8eac14..464d1e02e21 100644
--- a/lib/private/Setup/PostgreSQL.php
+++ b/lib/private/Setup/PostgreSQL.php
@@ -36,8 +36,8 @@ class PostgreSQL extends AbstractDatabase {
// adding port support through installer
if(!empty($this->dbPort)) {
- // adding slashes for security reasons
- $port = addslashes($this->dbPort);
+ // casting to int to avoid malicious input
+ $port = (int)$this->dbPort;
} else if(strpos($e_host, ':')) {
list($e_host, $port)=explode(':', $e_host, 2);
} else {