]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix setupFromToken when a password is set
authorRobin Appelman <icewind@owncloud.com>
Mon, 16 Jun 2014 14:09:56 +0000 (16:09 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 16 Jun 2014 14:09:56 +0000 (16:09 +0200)
apps/files_sharing/lib/helper.php

index a86cb832f3b51a2f841b64598f66a575e2d7639e..34de3a915aba9774700ad4c51086d2df2e4a2e15 100644 (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);