Skip to content
Snippets Groups Projects
Commit 9c2918a6 authored by Robin Appelman's avatar Robin Appelman
Browse files

Fix setupFromToken when a password is set

parent 0616eb40
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
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