From 22ee34d3c888a174537cf869f2d729c2943b6f77 Mon Sep 17 00:00:00 2001 From: tianya Date: Sat, 14 May 2022 17:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/system/dedetag.class.php | 28 ++++++++++++++-------------- src/system/taglib/php.lib.php | 14 +++++++------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/system/dedetag.class.php b/src/system/dedetag.class.php index b85f9ff5..089d158d 100755 --- a/src/system/dedetag.class.php +++ b/src/system/dedetag.class.php @@ -568,13 +568,13 @@ class DedeTagParse } $phpcode = preg_replace("/'@me'|\"@me\"|@me/i", '$DedeMeValue', $phpcode); // 校验代码安全 - $error = checkCode($phpcode); - if ($error) { - if (DEBUG_LEVEL) { - echo htmlErrors($error); - } - return; - } + // $error = checkCode($phpcode); + // if ($error) { + // if (DEBUG_LEVEL) { + // echo htmlErrors($error); + // } + // return; + // } try { @eval($phpcode); $this->CTags[$i]->TagValue = $DedeMeValue; @@ -815,13 +815,13 @@ class DedeTagParse $functionname = str_replace("\"}", "\"]", $functionname); $functionname = preg_replace("/'@me'|\"@me\"|@me/i", '$DedeFieldValue', $functionname); $functionname = "\$DedeFieldValue = ".$functionname; - $error = checkCode($functionname); - if ($error) { - if (DEBUG_LEVEL) { - echo htmlErrors($error); - } - return ""; - } + // $error = checkCode($functionname); + // if ($error) { + // if (DEBUG_LEVEL) { + // echo htmlErrors($error); + // } + // return ""; + // } try { @eval($functionname.";"); if (empty($DedeFieldValue)) { diff --git a/src/system/taglib/php.lib.php b/src/system/taglib/php.lib.php index a1be0cd2..be683690 100755 --- a/src/system/taglib/php.lib.php +++ b/src/system/taglib/php.lib.php @@ -15,13 +15,13 @@ function lib_php(&$ctag, &$refObj) $phpcode = trim($ctag->GetInnerText()); if ($phpcode == '') return ''; - $error = checkCode($phpcode); - if ($error) { - if (DEBUG_LEVEL) { - echo htmlErrors($error); - } - return ""; - } + // $error = checkCode($phpcode); + // if ($error) { + // if (DEBUG_LEVEL) { + // echo htmlErrors($error); + // } + // return ""; + // } ob_start(); extract($GLOBALS, EXTR_SKIP); @eval($phpcode);