summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/get.php
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-05-07 10:47:28 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-05-07 10:47:55 -0400
commit71423ec566e77d28dd923b91aa311b600987a6ea (patch)
treedd4176e177fbc410a59b7da510a170ed4c1d18cd /apps/files_sharing/get.php
parentb9033d3b78ed951321036de28a7db3b7559b158d (diff)
downloadnextcloud-server-71423ec566e77d28dd923b91aa311b600987a6ea.tar.gz
nextcloud-server-71423ec566e77d28dd923b91aa311b600987a6ea.zip
Fix bug oc-402, check if token is set for a private link
Diffstat (limited to 'apps/files_sharing/get.php')
-rwxr-xr-xapps/files_sharing/get.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/files_sharing/get.php b/apps/files_sharing/get.php
index 2b2c9dd07fd..f430c12a9c2 100755
--- a/apps/files_sharing/get.php
+++ b/apps/files_sharing/get.php
@@ -5,9 +5,7 @@ OCP\JSON::checkAppEnabled('files_sharing');
require_once 'lib_share.php';
//get the path of the shared file
-$token = $_GET['token'];
-$source = OC_Share::getSource($token);
-if ($source !== false) {
+if (isset($_GET['token']) && $source = OC_Share::getSource($_GET['token'])) {
// TODO Manipulating the string may not be the best choice. Is there an alternative?
$user = substr($source, 1, strpos($source, "/", 1) - 1);
OC_Util::setupFS($user);