1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Additional [php] protection

This commit is contained in:
mcfly
2007-11-10 19:24:42 +00:00
parent 8815507e0b
commit 74ffda4223
2 changed files with 13 additions and 8 deletions

View File

@@ -1,4 +1,9 @@
$search = array("&quot;", "&#039;", "&#036;", '<br />', E_NL, "-&gt;");
$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("&quot;", "&#039;", "&#036;", '<br />', E_NL, "-&gt;");
$replace = array('"', "'", "$", "\n", "\n", "->");
$code_text = str_replace($search, $replace, $code_text);
return eval($code_text);
}
return '';