Skip to content
Snippets Groups Projects
Commit 71423ec5 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Fix bug oc-402, check if token is set for a private link

parent b9033d3b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment