Explorar el Código

Update PageController.class.php

star7th hace 8 años
padre
commit
1821ebb27e
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      Application/Home/Controller/PageController.class.php

+ 3 - 0
Application/Home/Controller/PageController.class.php

@@ -247,6 +247,9 @@ class PageController extends BaseController {
         if ($_FILES['editormd-image-file']['name'] == 'blob') {
             $_FILES['editormd-image-file']['name'] .= '.jpg';
         }
+        if (strstr(strtolower($_FILES['editormd-image-file']['name']), ".php") ) {
+            return false;
+        }
         if (!empty($qiniu_config['driverConfig']['secrectKey'])) {
           //上传到七牛
           $Upload = new \Think\Upload(C('UPLOAD_SITEIMG_QINIU'));