mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 05:07:27 +02:00
Additional [php] protection
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
$search = array(""", "'", "$", '<br />', E_NL, "->");
|
if(!$postID) { return ''; }
|
||||||
$replace = array('"', "'", "$", "\n", "\n", "->");
|
if($postID == 'admin' || check_class($pref['php_bbcode'], '', $postID))
|
||||||
$code_text = str_replace($search, $replace, $code_text);
|
{
|
||||||
return eval($code_text);
|
$search = array(""", "'", "$", '<br />', E_NL, "->");
|
||||||
|
$replace = array('"', "'", "$", "\n", "\n", "->");
|
||||||
|
$code_text = str_replace($search, $replace, $code_text);
|
||||||
|
return eval($code_text);
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||||
| $Revision: 1.20 $
|
| $Revision: 1.21 $
|
||||||
| $Date: 2007-11-08 22:46:49 $
|
| $Date: 2007-11-10 19:24:42 $
|
||||||
| $Author: e107steved $
|
| $Author: mcfly_e107 $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -161,7 +161,7 @@ class e_parse
|
|||||||
$data = str_replace('\\', '\', $data);
|
$data = str_replace('\\', '\', $data);
|
||||||
$ret = preg_replace("/&#(\d*?);/", "&#\\1;", $data);
|
$ret = preg_replace("/&#(\d*?);/", "&#\\1;", $data);
|
||||||
}
|
}
|
||||||
if (!check_class($pref['php_bbcode']) || (is_numeric($original_author) && !check_class($pref['php_bbcode'], '', $original_author)) || strpos($mod, 'no_php') !== false)
|
if (strpos($mod, 'no_php') !== false)
|
||||||
{
|
{
|
||||||
$ret = str_replace(array("[php]", "[/php]"), array("[php]", "[/php]"), $ret);
|
$ret = str_replace(array("[php]", "[/php]"), array("[php]", "[/php]"), $ret);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user