summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/ajax/preview.php2
-rw-r--r--core/js/mimetypelist.js3
2 files changed, 5 insertions, 0 deletions
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index 2894efdc8e3..6cfba6aef30 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -53,6 +53,8 @@ $info = \OC\Files\Filesystem::getFileInfo($file);
if (!$info instanceof OCP\Files\FileInfo || !$always && !\OC::$server->getPreviewManager()->isAvailable($info)) {
\OC_Response::setStatus(404);
+} else if (!$info->isReadable()) {
+ \OC_Response::setStatus(403);
} else {
$preview = new \OC\Preview(\OC_User::getUser(), 'files');
$preview->setFile($file, $info);
diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js
index 08b892ce8bb..e1b9dba14af 100644
--- a/core/js/mimetypelist.js
+++ b/core/js/mimetypelist.js
@@ -65,6 +65,9 @@ OC.MimeTypeList={
"application/x-font": "image",
"application/x-gimp": "image",
"application/x-gzip": "package/x-generic",
+ "application/x-iwork-keynote-sffkey": "x-office/presentation",
+ "application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet",
+ "application/x-iwork-pages-sffpages": "x-office/document",
"application/x-mobipocket-ebook": "text",
"application/x-perl": "text/code",
"application/x-photoshop": "image",