From 1c6a7287f0ca5c88c519a50ff7676c8e2ed892f1 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 14 May 2014 19:31:13 +0300 Subject: [PATCH] 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