[Pkg-owncloud-commits] [owncloud] 04/34: Fixed array detection on public download
David Prévot
taffit at moszumanska.debian.org
Fri Oct 17 01:32:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 372676ee17c085286e00ed011af7a2de74c83e55
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Mon Oct 13 12:54:21 2014 +0200
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
---
apps/files_sharing/public.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 29cb35b..ea84400 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list