Explorar o código

Update PageController.class.php

star7th %!s(int64=6) %!d(string=hai) anos
pai
achega
b74e9f65a6
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      server/Application/Api/Controller/PageController.class.php

+ 9 - 1
server/Application/Api/Controller/PageController.class.php

@@ -219,6 +219,10 @@ class PageController extends BaseController {
             $_FILES['editormd-image-file']['name'] .= '.jpg';
         }
         
+        if (!$_FILES['editormd-image-file']) {
+           return false;
+        }
+        
         if (strstr(strtolower($_FILES['editormd-image-file']['name']), ".php") ) {
             return false;
         }
@@ -265,7 +269,11 @@ class PageController extends BaseController {
             $this->sendError(10103);
             return;
         }
-
+        
+        if (!$uploadFile) {
+           return false;
+        }
+        
         if (strstr(strtolower($uploadFile['name']), ".php") ) {
             return false;
         }