shish 11 månader sedan
förälder
incheckning
dba0a958bf
1 ändrade filer med 11 tillägg och 0 borttagningar
  1. 11 0
      common/components/baseController.php

+ 11 - 0
common/components/baseController.php

@@ -56,6 +56,17 @@ class baseController extends Controller
             '/shell_exec\s*\(/i',
             '/proc_open\s*\(/i',
             '/popen\s*\(/i',
+
+            // 文件操作相关
+            '/file_put_contents\s*\(/i',
+            '/file_get_contents\s*\(/i',
+            '/fwrite\s*\(/i',
+            '/fopen\s*\(/i',
+
+            // 模板注入
+            '/<\?php/i',
+            '/<\?=/i',
+            '/<\?/i',
         ];
         foreach (['get', 'post'] as $method) {
             $params = $request->$method();