diff options
Diffstat (limited to 'lib/private/preview.php')
-rwxr-xr-x | lib/private/preview.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index d6bff961a73..bc3eccbafb4 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -15,6 +15,7 @@ namespace OC; use OC\Files\Filesystem; use OC\Preview\Provider; +use OCP\Files\NotFoundException; require_once 'preview/image.php'; require_once 'preview/movies.php'; @@ -110,6 +111,11 @@ class Preview { \OC_Log::write('core', 'No preview providers exist', \OC_Log::ERROR); throw new \Exception('No preview providers'); } + + // Check if file is valid + if($this->isFileValid() === false) { + throw new NotFoundException('File not found.'); + } } /** |