summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-10-13 12:54:21 +0200
committerVincent Petry <pvince81@owncloud.com>2014-10-13 16:56:37 +0200
commit372676ee17c085286e00ed011af7a2de74c83e55 (patch)
tree287f513b9a56a733b89b0a4660c05587eb8224e4 /apps/files_sharing
parent686a43ccf324d34b664cc92549d2263fd366d544 (diff)
downloadnextcloud-server-372676ee17c085286e00ed011af7a2de74c83e55.tar.gz
nextcloud-server-372676ee17c085286e00ed011af7a2de74c83e55.zip
Fixed array detection on public download
When downloading a folder called "0001" PHP should fallback to parsing it as string and properly detect that it is not a JSON array. Backport of 6cbabdf217f55df3655143aa82b6e5e74650df05 from master
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/public.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 29cb35b2c6c..ea84400f103 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -108,7 +108,7 @@ if (isset($path)) {
$files = $_GET['files'];
$files_list = json_decode($files);
// in case we get only a single file
- if ($files_list === NULL ) {
+ if (!is_array($files_list)) {
$files_list = array($files);
}
OC_Files::get($path, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD');