[Pkg-owncloud-commits] [owncloud] 127/205: Fix for #17178

David Prévot taffit at moszumanska.debian.org
Thu Jul 2 17:37:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 27d5838fb7046295adc7b4f4b29225a392b640e4
Author: Roeland Jago Douma <roeland at famdouma.nl>
Date:   Thu Jun 25 21:16:18 2015 +0200

    Fix for #17178
    
    If no array of arrays is submitted make sure we still keep $sharedUsers
    and $sharedGroups as arrays so the rest of the code keeps functioning as
    it should.
---
 core/ajax/share.php | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/core/ajax/share.php b/core/ajax/share.php
index e78d274..f84325d 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -273,8 +273,15 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 				$sharedUsers = [];
 				$sharedGroups = [];
 				if (isset($_GET['itemShares'])) {
-					$sharedUsers = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) ? $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER] : [];
-					$sharedGroups = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) ? $_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP] : [];
+					if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER]) &&
+					    is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_USER])) {
+						$sharedUsers = $_GET['itemShares'][OCP\Share::SHARE_TYPE_USER];
+					}
+
+					if (isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]) &&
+					    is_array($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP])) {
+						$sharedGroups = isset($_GET['itemShares'][OCP\Share::SHARE_TYPE_GROUP]);
+					}
 				}
 
 				$count = 0;

-- 
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