[Pkg-owncloud-commits] [owncloud] 14/62: No injections
David Prévot
taffit at moszumanska.debian.org
Tue Jun 23 23:39:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.5beta
in repository owncloud.
commit 0b38c138914db303902445141c9b3f5e4f532b29
Author: Roeland Jago Douma <roeland at famdouma.nl>
Date: Mon Mar 30 20:07:12 2015 +0200
No injections
---
lib/private/share/share.php | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 12640c0..d9f8206 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1152,7 +1152,8 @@ class Share extends \OC\Share\Constants {
$qb->select('`uid_owner`')
->from('`*PREFIX*share`')
- ->where($qb->expr()->eq('`id`', $shareId));
+ ->where('`id` = :shareId')
+ ->setParameter(':shareId', $shareId);
$result = $qb->execute();
$result = $result->fetch();
@@ -1200,8 +1201,11 @@ class Share extends \OC\Share\Constants {
$qb = $connection->createQueryBuilder();
$qb->update('`*PREFIX*share`')
- ->set('`share_with`', is_null($password) ? 'NULL' : $qb->expr()->literal(\OC::$server->getHasher()->hash($password)))
- ->where($qb->expr()->eq('`id`', $shareId));
+ ->set('`share_with`', ':pass')
+ ->where('`id` = :shareId')
+ ->setParameter(':pass', is_null($password) ? 'NULL' : $qb->expr()->literal(\OC::$server->getHasher()->hash($password)))
+ ->setParameter(':shareId', $shareId);
+
$qb->execute();
return true;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list