添加过滤条件
This commit is contained in:
@@ -73,7 +73,7 @@ class Fastphp
|
||||
unset($_GET['s']);
|
||||
}
|
||||
$get_data = json_encode($_GET).json_encode($_POST).file_get_contents("php://input");
|
||||
if ((stripos($get_data, 'substring') !== false)||(stripos($get_data, 'TO_BASE64') !== false)||(stripos($get_data, 'insert') !== false)||(stripos($get_data, 'select') !== false)||(stripos($get_data, 'alert') !== false)||(stripos($get_data, 'UNION') !== false)||(stripos($get_data, 'OUTFILE') !== false)) {
|
||||
if ((stripos($get_data, 'substring') !== false)||(stripos($get_data, 'DUMPFILE') !== false)||(stripos($get_data, 'EXECUTE') !== false)||(stripos($get_data, 'TO_BASE64') !== false)||(stripos($get_data, 'insert') !== false)||(stripos($get_data, 'select') !== false)||(stripos($get_data, 'drop') !== false)||(stripos($get_data, 'grant') !== false)||(stripos($get_data, 'alert') !== false)||(stripos($get_data, 'UNION') !== false)||(stripos($get_data, 'OUTFILE') !== false)) {
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -95,9 +95,11 @@ class Fastphp
|
||||
//判断控制器和操作是否存在
|
||||
$controller = 'app\\' . $controllerName;
|
||||
if (!class_exists($controller)) {
|
||||
die;
|
||||
exit($controller . '控制器不存在!');
|
||||
}
|
||||
if (!method_exists($controller, $actionName)) {
|
||||
die;
|
||||
exit($actionName . '方法不存在!');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user