aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/oracle.php5
-rw-r--r--phpBB/includes/db/postgres.php5
2 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 55b3599800..5a9b18abf0 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -261,6 +261,10 @@ class dbal_oracle extends dbal
{
$cols = explode(', ', $regs[2]);
+/* The code inside this comment block breaks clob handling, but does allow the
+ database restore script to work. If you want to allow no posts longer than 4KB
+ and/or need the db restore script, uncomment this.
+
preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
if (sizeof($cols) !== sizeof($vals))
@@ -310,6 +314,7 @@ class dbal_oracle extends dbal
$vals = array(0 => $vals);
}
+*/
$inserts = $vals[0];
unset($vals);
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index b3139b3d79..2a885f1d04 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -46,7 +46,10 @@ class dbal_postgres extends dbal
if ($sqlserver)
{
- if (strpos($sqlserver, ':') !== false)
+ // $sqlserver can carry a port separated by : for compatibility reasons
+ // If $sqlserver has more than one : it's probably an IPv6 address.
+ // In this case we only allow passing a port via the $port variable.
+ if (substr_count($sqlserver, ':') === 1)
{
list($sqlserver, $port) = explode(':', $sqlserver);
}