1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-17 21:11:18 +02:00

Debug info cleanup

This commit is contained in:
Cameron
2015-03-29 20:26:35 -07:00
parent e3e51fa59c
commit 899281eaaf
3 changed files with 36 additions and 8 deletions

View File

@@ -339,7 +339,6 @@ class e107
*/ */
protected function _init($e107_paths, $e107_root_path, $e107_config_mysql_info, $e107_config_override = array()) protected function _init($e107_paths, $e107_root_path, $e107_config_mysql_info, $e107_config_override = array())
{ {
if(empty($this->e107_dirs)) if(empty($this->e107_dirs))
{ {
// Do some security checks/cleanup, prepare the environment // Do some security checks/cleanup, prepare the environment
@@ -2861,6 +2860,10 @@ class e107
if(preg_match($regex,$input)) if(preg_match($regex,$input))
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
@@ -2869,12 +2872,20 @@ class e107
if(preg_match($regex,$input)) if(preg_match($regex,$input))
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
if(preg_match("/system *?\((.*);.*\)/i",$input)) if(preg_match("/system\((.*);.*\)/i",$input))
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
@@ -2882,6 +2893,10 @@ class e107
if(preg_match($regex,$input)) if(preg_match($regex,$input))
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
@@ -2900,12 +2915,20 @@ class e107
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
if(($key == "HTTP_USER_AGENT") && strpos($input,"libwww-perl")!==FALSE) if(($key == "HTTP_USER_AGENT") && strpos($input,"libwww-perl")!==FALSE)
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }
@@ -2915,6 +2938,10 @@ class e107
if(strpos(str_replace('.', '', $input), '22250738585072011') !== FALSE) // php-bug 53632 if(strpos(str_replace('.', '', $input), '22250738585072011') !== FALSE) // php-bug 53632
{ {
header('HTTP/1.0 400 Bad Request', true, 400); header('HTTP/1.0 400 Bad Request', true, 400);
if(deftrue('e_DEBUG'))
{
echo "Bad Request: ".__METHOD__." : ". __LINE__;
}
exit(); exit();
} }

View File

@@ -1593,10 +1593,11 @@ class e_parse extends e_parser
elseif(substr($sub_blk, 0, 6) == '<style') elseif(substr($sub_blk, 0, 6) == '<style')
{ {
// Its a style block - just pass it through unaltered - except, do we need the line break stuff? - QUERY XXX-01 // Its a style block - just pass it through unaltered - except, do we need the line break stuff? - QUERY XXX-01
if(DB_INF_SHOW) if(defined('DB_INF_SHOW'))
{ {
echo "Processing stylesheet: {$sub_blk}<br />"; echo "Processing stylesheet: {$sub_blk}<br />";
} }
$ret_parser .= $sub_blk; $ret_parser .= $sub_blk;
} }
else else

View File

@@ -40,7 +40,7 @@ class notify
{ {
$active = e107::getConfig()->get('notify'); $active = e107::getConfig()->get('notify');
if(empty($active)) if(empty($active) && e_PAGE == 'notify.php')
{ {
e107::getMessage()->addDebug('Notify is disabled!'); e107::getMessage()->addDebug('Notify is disabled!');
return false; return false;