]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if the app is enabled and the app path is found before trying to load the scrip...
authorBart Visscher <bartv@thisnet.nl>
Fri, 28 Jun 2013 17:22:51 +0000 (19:22 +0200)
committerBart Visscher <bartv@thisnet.nl>
Fri, 28 Jun 2013 18:34:28 +0000 (20:34 +0200)
lib/base.php

index fd4870974fe1b2b8b456a1cd4f868865da5f531a..af0a30ea1737920ba5e7155fa066b6cb1758dee2 100644 (file)
@@ -661,12 +661,15 @@ class OC {
                $app = $param['app'];
                $file = $param['file'];
                $app_path = OC_App::getAppPath($app);
-               $file = $app_path . '/' . $file;
-               unset($app, $app_path);
-               if (file_exists($file)) {
-                       require_once $file;
-                       return true;
+               if (OC_App::isEnabled($app) && $app_path !== false) {
+                       $file = $app_path . '/' . $file;
+                       unset($app, $app_path);
+                       if (file_exists($file)) {
+                               require_once $file;
+                               return true;
+                       }
                }
+               header('HTTP/1.0 404 Not Found');
                return false;
        }