mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Additional [php] protection
This commit is contained in:
parent
8815507e0b
commit
74ffda4223
@ -1,4 +1,9 @@
|
||||
$search = array(""", "'", "$", '<br />', E_NL, "->");
|
||||
$replace = array('"', "'", "$", "\n", "\n", "->");
|
||||
$code_text = str_replace($search, $replace, $code_text);
|
||||
return eval($code_text);
|
||||
if(!$postID) { return ''; }
|
||||
if($postID == 'admin' || check_class($pref['php_bbcode'], '', $postID))
|
||||
{
|
||||
$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).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
|
||||
| $Revision: 1.20 $
|
||||
| $Date: 2007-11-08 22:46:49 $
|
||||
| $Author: e107steved $
|
||||
| $Revision: 1.21 $
|
||||
| $Date: 2007-11-10 19:24:42 $
|
||||
| $Author: mcfly_e107 $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@ -161,7 +161,7 @@ class e_parse
|
||||
$data = str_replace('\\', '\', $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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user