summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/public.php2
-rw-r--r--lib/public/share.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 362dc2d0c85..a91efce888d 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -7,7 +7,7 @@ OC_App::loadApps();
// support will be removed in OC 5.0,a
if (isset($_GET['token'])) {
unset($_GET['file']);
- $qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ? LIMIT 1');
+ $qry = \OC_DB::prepare('SELECT `source` FROM `*PREFIX*sharing` WHERE `target` = ?', 1);
$filepath = $qry->execute(array($_GET['token']))->fetchOne();
if(isset($filepath)) {
$info = OC_FileCache_Cached::get($filepath, '');
diff --git a/lib/public/share.php b/lib/public/share.php
index 36f6b103ff0..faec4ce6bad 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -149,7 +149,7 @@ class Share {
* @return Item
*/
public static function getShareByToken($token) {
- $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?',1);
+ $query = \OC_DB::prepare('SELECT * FROM `*PREFIX*share` WHERE `token` = ?', 1);
$result = $query->execute(array($token));
if (\OC_DB::isError($result)) {
\OC_Log::write('OCP\Share', \OC_DB::getErrorMessage($result) . ', token=' . $token, \OC_Log::ERROR);