You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

public.php 743B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. $RUNTIME_NOAPPS = true;
  3. try {
  4. require_once 'lib/base.php';
  5. OC::checkMaintenanceMode();
  6. if (!isset($_GET['service'])) {
  7. header('HTTP/1.0 404 Not Found');
  8. exit;
  9. }
  10. $file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($_GET['service']));
  11. if(is_null($file)) {
  12. header('HTTP/1.0 404 Not Found');
  13. exit;
  14. }
  15. $parts=explode('/', $file, 2);
  16. $app=$parts[0];
  17. OC_Util::checkAppEnabled($app);
  18. OC_App::loadApp($app);
  19. require_once OC_App::getAppPath($app) .'/'. $parts[1];
  20. } catch (Exception $ex) {
  21. //show the user a detailed error page
  22. OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
  23. \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
  24. OC_Template::printExceptionErrorPage($ex);
  25. }