Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-06-23 13:05:19 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-06-23 13:05:19 +0300
commitbbfc30ad2c59bba260bbb2ca3e8d39133dab08f6 (patch)
tree50c6917c7a2af572e2147706eabae10a787b84ca
parentf170db6eecd31a7309ceb140f881937c047ea1b2 (diff)
parentd09fafa6877835a43eae3a045916e51bc290a6e1 (diff)
Merge pull request #191 from owncloud/stable8-verify-pathv8.0.5betav8.0.5RC1
[stable8] Verify if path exists before processing
-rw-r--r--ajax/batch.php3
-rw-r--r--ajax/getimages.php3
-rw-r--r--ajax/image.php3
-rw-r--r--ajax/thumbnail.php3
4 files changed, 12 insertions, 0 deletions
diff --git a/ajax/batch.php b/ajax/batch.php
index eb1a7f17..164f78e4 100644
--- a/ajax/batch.php
+++ b/ajax/batch.php
@@ -27,6 +27,9 @@ if (!empty($_GET['token'])) {
OC_Util::setupFS($user);
$root = \OC\Files\Filesystem::getPath($linkItem['file_source']) . '/';
+ if($root === null) {
+ exit();
+ }
$images = array_map(function ($image) use ($root) {
return $root . $image;
}, $images);
diff --git a/ajax/getimages.php b/ajax/getimages.php
index 9c8a7cd5..40ce0154 100644
--- a/ajax/getimages.php
+++ b/ajax/getimages.php
@@ -28,6 +28,9 @@ if (isset($_GET['token'])) {
// The token defines the target directory (security reasons)
$path = \OC\Files\Filesystem::getPath($linkItem['file_source']);
+ if($path === null) {
+ exit();
+ }
$view = new \OC\Files\View(\OC\Files\Filesystem::getView()->getAbsolutePath($path));
$images = $view->searchByMime('image');
diff --git a/ajax/image.php b/ajax/image.php
index 49c132ca..d29030ef 100644
--- a/ajax/image.php
+++ b/ajax/image.php
@@ -26,6 +26,9 @@ if (!empty($_GET['token'])) {
OC_User::setIncognitoMode(true);
$fullPath = \OC\Files\Filesystem::getPath($linkItem['file_source']);
+ if($fullPath === null) {
+ exit();
+ }
$img = trim($fullPath . '/' . $img);
} else {
OCP\JSON::checkLoggedIn();
diff --git a/ajax/thumbnail.php b/ajax/thumbnail.php
index e983fe59..b40ed542 100644
--- a/ajax/thumbnail.php
+++ b/ajax/thumbnail.php
@@ -27,6 +27,9 @@ if (!empty($_GET['token'])) {
OC_Util::setupFS($user);
$fullPath = \OC\Files\Filesystem::getPath($linkItem['file_source']);
+ if($fullPath === null) {
+ exit();
+ }
$img = trim($fullPath . '/' . $img);
} else {
OCP\JSON::checkLoggedIn();