cvs: pear /MDB2/MDB2/Driver/Datatype fbsql.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php
| From: | Lukas Smith | Date: | Sun, 16 Oct 2005 15:18:08 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Datatype fbsql.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35599@lists.php.net to get a copy of this message | ||
lsmith Sun Oct 16 11:18:08 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Datatype fbsql.php mssql.php mysql.php
mysqli.php oci8.php pgsql.php
sqlite.php
Log:
- lets just escape floats to make sure they do not contain evil characters (bug #5608)
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/fbsql.php?r1=1.22&r2=1.23&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/fbsql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/fbsql.php:1.22 pear/MDB2/MDB2/Driver/Datatype/fbsql.php:1.23
--- pear/MDB2/MDB2/Driver/Datatype/fbsql.php:1.22 Fri Oct 14 18:39:52 2005
+++ pear/MDB2/MDB2/Driver/Datatype/fbsql.php Sun Oct 16 11:18:06 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: fbsql.php,v 1.22 2005/10/14 22:39:52 lsmith Exp $
+// $Id: fbsql.php,v 1.23 2005/10/16 15:18:06 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -247,7 +247,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/mssql.php?r1=1.23&r2=1.24&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/mssql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.23 pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.24
--- pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.23 Fri Oct 14 18:39:52 2005
+++ pear/MDB2/MDB2/Driver/Datatype/mssql.php Sun Oct 16 11:18:06 2005
@@ -44,7 +44,7 @@
// | Daniel Convissor <danielc@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: mssql.php,v 1.23 2005/10/14 22:39:52 lsmith Exp $
+// $Id: mssql.php,v 1.24 2005/10/16 15:18:06 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -209,7 +209,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/mysql.php?r1=1.21&r2=1.22&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/mysql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/mysql.php:1.21 pear/MDB2/MDB2/Driver/Datatype/mysql.php:1.22
--- pear/MDB2/MDB2/Driver/Datatype/mysql.php:1.21 Fri Oct 14 18:39:52 2005
+++ pear/MDB2/MDB2/Driver/Datatype/mysql.php Sun Oct 16 11:18:06 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.21 2005/10/14 22:39:52 lsmith Exp $
+// $Id: mysql.php,v 1.22 2005/10/16 15:18:06 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -222,7 +222,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/mysqli.php?r1=1.16&r2=1.17&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/mysqli.php
diff -u pear/MDB2/MDB2/Driver/Datatype/mysqli.php:1.16
pear/MDB2/MDB2/Driver/Datatype/mysqli.php:1.17
--- pear/MDB2/MDB2/Driver/Datatype/mysqli.php:1.16 Fri Oct 14 18:39:52 2005
+++ pear/MDB2/MDB2/Driver/Datatype/mysqli.php Sun Oct 16 11:18:06 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: mysqli.php,v 1.16 2005/10/14 22:39:52 lsmith Exp $
+// $Id: mysqli.php,v 1.17 2005/10/16 15:18:06 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -222,7 +222,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/oci8.php?r1=1.34&r2=1.35&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/oci8.php
diff -u pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.34 pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.35
--- pear/MDB2/MDB2/Driver/Datatype/oci8.php:1.34 Fri Oct 14 18:39:52 2005
+++ pear/MDB2/MDB2/Driver/Datatype/oci8.php Sun Oct 16 11:18:06 2005
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
-// $Id: oci8.php,v 1.34 2005/10/14 22:39:52 lsmith Exp $
+// $Id: oci8.php,v 1.35 2005/10/16 15:18:06 lsmith Exp $
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -235,7 +235,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);;
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/pgsql.php?r1=1.35&r2=1.36&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/pgsql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.35 pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.36
--- pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.35 Fri Oct 14 18:39:53 2005
+++ pear/MDB2/MDB2/Driver/Datatype/pgsql.php Sun Oct 16 11:18:06 2005
@@ -42,7 +42,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: pgsql.php,v 1.35 2005/10/14 22:39:53 lsmith Exp $
+// $Id: pgsql.php,v 1.36 2005/10/16 15:18:06 lsmith Exp $
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -342,7 +342,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Datatype/sqlite.php?r1=1.27&r2=1.28&ty=u
Index: pear/MDB2/MDB2/Driver/Datatype/sqlite.php
diff -u pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.27
pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.28
--- pear/MDB2/MDB2/Driver/Datatype/sqlite.php:1.27 Fri Oct 14 18:39:53 2005
+++ pear/MDB2/MDB2/Driver/Datatype/sqlite.php Sun Oct 16 11:18:06 2005
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: sqlite.php,v 1.27 2005/10/14 22:39:53 lsmith Exp $
+// $Id: sqlite.php,v 1.28 2005/10/16 15:18:06 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -205,7 +205,12 @@
*/
function _quoteFloat($value)
{
- return (float)$value;
+ $db =& $this->getDBInstance();
+ if (PEAR::isError($db)) {
+ return $db;
+ }
+
+ return $db->escape($value);
}
// }}}