No injections
This commit is contained in:
parent
b0aa17b13f
commit
0bf06d6691
|
@ -1167,7 +1167,8 @@ class Share extends \OC\Share\Constants {
|
||||||
|
|
||||||
$qb->select('`uid_owner`')
|
$qb->select('`uid_owner`')
|
||||||
->from('`*PREFIX*share`')
|
->from('`*PREFIX*share`')
|
||||||
->where($qb->expr()->eq('`id`', $shareId));
|
->where('`id` = :shareId')
|
||||||
|
->setParameter(':shareId', $shareId);
|
||||||
$result = $qb->execute();
|
$result = $qb->execute();
|
||||||
$result = $result->fetch();
|
$result = $result->fetch();
|
||||||
|
|
||||||
|
@ -1215,8 +1216,11 @@ class Share extends \OC\Share\Constants {
|
||||||
|
|
||||||
$qb = $connection->createQueryBuilder();
|
$qb = $connection->createQueryBuilder();
|
||||||
$qb->update('`*PREFIX*share`')
|
$qb->update('`*PREFIX*share`')
|
||||||
->set('`share_with`', is_null($password) ? 'NULL' : $qb->expr()->literal(\OC::$server->getHasher()->hash($password)))
|
->set('`share_with`', ':pass')
|
||||||
->where($qb->expr()->eq('`id`', $shareId));
|
->where('`id` = :shareId')
|
||||||
|
->setParameter(':pass', is_null($password) ? 'NULL' : $qb->expr()->literal(\OC::$server->getHasher()->hash($password)))
|
||||||
|
->setParameter(':shareId', $shareId);
|
||||||
|
|
||||||
$qb->execute();
|
$qb->execute();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue