|
|
|
|
@ -16,7 +16,7 @@ class Helper {
|
|
|
|
|
public static function setupFromToken($token, $relativePath = null, $password = null) {
|
|
|
|
|
\OC_User::setIncognitoMode(true);
|
|
|
|
|
|
|
|
|
|
$linkItem = \OCP\Share::getShareByToken($token);
|
|
|
|
|
$linkItem = \OCP\Share::getShareByToken($token, !$password);
|
|
|
|
|
if($linkItem === false || ($linkItem['item_type'] !== 'file' && $linkItem['item_type'] !== 'folder')) {
|
|
|
|
|
\OC_Response::setStatus(404);
|
|
|
|
|
\OC_Log::write('core-preview', 'Passed token parameter is not valid', \OC_Log::DEBUG);
|
|
|
|
|
|