Fix setupFromToken when a password is set

This commit is contained in:
Robin Appelman 2014-06-16 16:09:56 +02:00
parent 0616eb4007
commit 9c2918a626
1 changed files with 1 additions and 1 deletions

View File

@ -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);