summaryrefslogtreecommitdiff
path: root/adodb-perf.inc.php
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2021-01-25 01:52:20 +0100
committerDamien Regad <dregad@mantisbt.org>2021-01-25 02:12:07 +0100
commitfaf71c5f3ef8823328f4f98e4562744ff04632ee (patch)
tree196cbc66e6c51d064cf3e36f18550d69bc4a7927 /adodb-perf.inc.php
parent82e26bb5db3649641117749374a219201b86cbd9 (diff)
downloadadodb-faf71c5f3ef8823328f4f98e4562744ff04632ee.tar.gz
adodb-faf71c5f3ef8823328f4f98e4562744ff04632ee.tar.bz2
adodb-faf71c5f3ef8823328f4f98e4562744ff04632ee.zip
Remove all magic quotes related code
The $magic_quote parameter for public methods was kept for backwards compatibility purposes, but is no longer used. Fixes #674
Diffstat (limited to 'adodb-perf.inc.php')
-rw-r--r--adodb-perf.inc.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/adodb-perf.inc.php b/adodb-perf.inc.php
index 87272e05..a735dac5 100644
--- a/adodb-perf.inc.php
+++ b/adodb-perf.inc.php
@@ -691,16 +691,6 @@ Committed_AS: 348732 kB
}
$this->conn->LogSQL($savelog);
- // magic quotes
- // PHP7.4 spits deprecated notice, PHP8 removed magic_* stuff
- if (isset($_GET['sql']) &&
- version_compare(PHP_VERSION, '7.4.0', '<')
- && function_exists('get_magic_quotes_gpc')
- && get_magic_quotes_gpc()
- ) {
- $_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']);
- }
-
if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10;
else $nsql = $_SESSION['ADODB_PERF_SQL'];
@@ -956,7 +946,7 @@ Committed_AS: 348732 kB
<?php
if (!isset($_REQUEST['sql'])) return;
- $sql = $this->undomq(trim($sql));
+ $sql = trim($sql);
if (substr($sql,strlen($sql)-1) === ';') {
$print = true;
$sqla = $this->SplitSQL($sql);
@@ -1000,18 +990,6 @@ Committed_AS: 348732 kB
return $arr;
}
- function undomq($m)
- {
- if (get_magic_quotes_gpc()) {
- // undo the damage
- $m = str_replace('\\\\','\\',$m);
- $m = str_replace('\"','"',$m);
- $m = str_replace('\\\'','\'',$m);
- }
- return $m;
-}
-
-
/************************************************************************/
/**