aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db')
-rw-r--r--phpBB/includes/db/mysql.php10
-rw-r--r--phpBB/includes/db/mysql4.php10
-rw-r--r--phpBB/includes/db/mysqli.php10
3 files changed, 30 insertions, 0 deletions
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 7e363721a9..ee7918473d 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -328,6 +328,16 @@ class dbal_mysql extends dbal
return @mysql_real_escape_string($msg, $this->db_connect_id);
}
+ function sql_escape_binary($msg)
+ {
+ // If the last char is
+ if (substr($msg, -1) == ' ')
+ {
+ $msg .= "\0";
+ }
+ return "'" . $this->sql_escape($msg) . "'";
+ }
+
/**
* Build db-specific query data
* @access: private
diff --git a/phpBB/includes/db/mysql4.php b/phpBB/includes/db/mysql4.php
index 071f4c4b55..c63d5fb064 100644
--- a/phpBB/includes/db/mysql4.php
+++ b/phpBB/includes/db/mysql4.php
@@ -331,6 +331,16 @@ class dbal_mysql4 extends dbal
return @mysql_real_escape_string($msg, $this->db_connect_id);
}
+ function sql_escape_binary($msg)
+ {
+ // If the last char is
+ if (substr($msg, -1) == ' ')
+ {
+ $msg .= "\0";
+ }
+ return "'" . $this->sql_escape($msg) . "'";
+ }
+
/**
* Build db-specific query data
* @access: private
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index fa4d3ffdc7..46ddd55569 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -311,6 +311,16 @@ class dbal_mysqli extends dbal
return @mysqli_real_escape_string($this->db_connect_id, $msg);
}
+ function sql_escape_binary($msg)
+ {
+ // If the last char is
+ if (substr($msg, -1) == ' ')
+ {
+ $msg .= "\0";
+ }
+ return "'" . $this->sql_escape($msg) . "'";
+ }
+
/**
* Build db-specific query data
* @access: private