summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-06-16 16:09:56 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-16 16:09:56 +0200
commit9c2918a62693b4316638eaefcd6cf5ad3c58979f (patch)
tree4859515a134fe4af378cf4250538e83476fe5a42 /apps/files_sharing
parent0616eb4007b14d701ca3949c83bddf0a31507b56 (diff)
downloadnextcloud-server-9c2918a62693b4316638eaefcd6cf5ad3c58979f.tar.gz
nextcloud-server-9c2918a62693b4316638eaefcd6cf5ad3c58979f.zip
Fix setupFromToken when a password is set
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index a86cb832f3b..34de3a915ab 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -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);