Browse Source

End processing when file is not found

We have to end the processing when a file is not found or otherwise the method is proceeding and even sending invalid file paths to the sendfile methods.

Due to nginx preventing directory traversals this is luckily not immediately exploitable. We should for hardening purposes however quit the script execution just as we do for 403 cases and others as well.
remotes/origin/poc-doctrine-migrations
Lukas Reschke 11 years ago
parent
commit
8ce3d6ea57
  1. 1
      lib/private/files.php

1
lib/private/files.php

@ -138,6 +138,7 @@ class OC_Files {
header("HTTP/1.0 404 Not Found");
$tmpl = new OC_Template('', '404', 'guest');
$tmpl->printPage();
exit();
} else {
header("HTTP/1.0 403 Forbidden");
die('403 Forbidden');

Loading…
Cancel
Save