Fix setupFromToken when a password is set
This commit is contained in:
parent
0616eb4007
commit
9c2918a626
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue