From 14398d697937dd994571a6db3166047164f839af Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 14 May 2014 19:24:58 +0300 Subject: [PATCH 1/2] One more method annotation --- lib/db/member.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/db/member.php b/lib/db/member.php index 17a5b9e1..d70295ff 100644 --- a/lib/db/member.php +++ b/lib/db/member.php @@ -16,6 +16,7 @@ namespace OCA\Documents; * @method boolean getIsGuest() * @method string getEsId() * @method string getToken() + * @method int getStatus() */ class Db_Member extends Db{ From 1c6a7287f0ca5c88c519a50ff7676c8e2ed892f1 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 14 May 2014 19:31:13 +0300 Subject: [PATCH 2/2] Do not respond if path is empty --- ajax/download.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ajax/download.php b/ajax/download.php index a1612ec5..1905ffe3 100644 --- a/ajax/download.php +++ b/ajax/download.php @@ -14,5 +14,10 @@ namespace OCA\Documents; \OCP\JSON::checkLoggedIn(); -$download = new Download(\OCP\User::getUser(), '/files' . @$_GET['path']); -$download->sendResponse(); +$path = Helper::getArrayValueByKey($_GET, 'path'); +if (!empty($path)){ + $fullPath = '/files' . $path; + $download = new Download(\OCP\User::getUser(), $fullPath); + $download->sendResponse(); +} +exit(); \ No newline at end of file