Remove @suppress SqlInjectionChecker

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-09-16 15:53:51 +02:00
parent 04a3580d19
commit 99c9423766
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
20 changed files with 0 additions and 47 deletions

View File

@ -742,7 +742,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param string $calendarUri * @param string $calendarUri
* @param array $properties * @param array $properties
* @return int * @return int
* @suppress SqlInjectionChecker
*/ */
public function createCalendar($principalUri, $calendarUri, array $properties) { public function createCalendar($principalUri, $calendarUri, array $properties) {
$values = [ $values = [
@ -818,9 +817,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$supportedProperties = array_keys($this->propertyMap); $supportedProperties = array_keys($this->propertyMap);
$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; $supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
/**
* @suppress SqlInjectionChecker
*/
$propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) { $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) {
$newValues = []; $newValues = [];
foreach ($mutations as $propertyName => $propertyValue) { foreach ($mutations as $propertyName => $propertyValue) {
@ -2148,9 +2144,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$supportedProperties = array_keys($this->subscriptionPropertyMap); $supportedProperties = array_keys($this->subscriptionPropertyMap);
$supportedProperties[] = '{http://calendarserver.org/ns/}source'; $supportedProperties[] = '{http://calendarserver.org/ns/}source';
/**
* @suppress SqlInjectionChecker
*/
$propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) { $propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) {
$newValues = []; $newValues = [];

View File

@ -374,9 +374,6 @@ class CardDavBackend implements BackendInterface, SyncSupport {
'{' . Plugin::NS_CARDDAV . '}addressbook-description', '{' . Plugin::NS_CARDDAV . '}addressbook-description',
]; ];
/**
* @suppress SqlInjectionChecker
*/
$propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) { $propPatch->handle($supportedProperties, function ($mutations) use ($addressBookId) {
$updates = []; $updates = [];
foreach ($mutations as $property => $newValue) { foreach ($mutations as $property => $newValue) {

View File

@ -153,7 +153,6 @@ class DBConfigService {
* Get admin defined mounts * Get admin defined mounts
* *
* @return array * @return array
* @suppress SqlInjectionChecker
*/ */
public function getAdminMounts() { public function getAdminMounts() {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();
@ -198,7 +197,6 @@ class DBConfigService {
* @param int $type any of the self::APPLICABLE_TYPE_ constants * @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string|null $value user_id, group_id or null for global mounts * @param string|null $value user_id, group_id or null for global mounts
* @return array * @return array
* @suppress SqlInjectionChecker
*/ */
public function getAdminMountsFor($type, $value) { public function getAdminMountsFor($type, $value) {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();
@ -214,7 +212,6 @@ class DBConfigService {
* @param int $type any of the self::APPLICABLE_TYPE_ constants * @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string[] $values user_ids or group_ids * @param string[] $values user_ids or group_ids
* @return array * @return array
* @suppress SqlInjectionChecker
*/ */
public function getAdminMountsForMultiple($type, array $values) { public function getAdminMountsForMultiple($type, array $values) {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();
@ -238,7 +235,6 @@ class DBConfigService {
* @param int $type any of the self::APPLICABLE_TYPE_ constants * @param int $type any of the self::APPLICABLE_TYPE_ constants
* @param string|null $value user_id, group_id or null for global mounts * @param string|null $value user_id, group_id or null for global mounts
* @return array * @return array
* @suppress SqlInjectionChecker
*/ */
public function getUserMountsFor($type, $value) { public function getUserMountsFor($type, $value) {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();

View File

@ -295,7 +295,6 @@ class ConvertType extends Command implements CompletionAwareInterface {
* @param Table $table * @param Table $table
* @param InputInterface $input * @param InputInterface $input
* @param OutputInterface $output * @param OutputInterface $output
* @suppress SqlInjectionChecker
*/ */
protected function copyTable(Connection $fromDB, Connection $toDB, Table $table, InputInterface $input, OutputInterface $output) { protected function copyTable(Connection $fromDB, Connection $toDB, Table $table, InputInterface $input, OutputInterface $output) {
if ($table->getName() === $toDB->getPrefix() . 'migrations') { if ($table->getName() === $toDB->getPrefix() . 'migrations') {

View File

@ -78,8 +78,6 @@ class Version14000Date20180404140050 extends SimpleMigrationStep {
* @param IOutput $output * @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options * @param array $options
*
* @suppress SqlInjectionChecker
*/ */
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) { public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
$qb = $this->connection->getQueryBuilder(); $qb = $this->connection->getQueryBuilder();

View File

@ -180,7 +180,6 @@ class JobList implements IJobList {
* get the next job in the list * get the next job in the list
* *
* @return IJob|null * @return IJob|null
* @suppress SqlInjectionChecker
*/ */
public function getNext() { public function getNext() {
$query = $this->connection->getQueryBuilder(); $query = $this->connection->getQueryBuilder();
@ -300,7 +299,6 @@ class JobList implements IJobList {
* Remove the reservation for a job * Remove the reservation for a job
* *
* @param IJob $job * @param IJob $job
* @suppress SqlInjectionChecker
*/ */
public function unlockJob(IJob $job) { public function unlockJob(IJob $job) {
$query = $this->connection->getQueryBuilder(); $query = $this->connection->getQueryBuilder();

View File

@ -594,8 +594,6 @@ class Manager implements ICommentsManager {
* @param int $folderId * @param int $folderId
* @param IUser $user * @param IUser $user
* @return array [$fileId => $unreadCount] * @return array [$fileId => $unreadCount]
*
* @suppress SqlInjectionChecker
*/ */
public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) { public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) {
$qb = $this->dbConn->getQueryBuilder(); $qb = $this->dbConn->getQueryBuilder();
@ -935,7 +933,6 @@ class Manager implements ICommentsManager {
* @param \DateTime $dateTime * @param \DateTime $dateTime
* @param IUser $user * @param IUser $user
* @since 9.0.0 * @since 9.0.0
* @suppress SqlInjectionChecker
*/ */
public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) { public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) {
$this->checkRoleParameters('Object', $objectType, $objectId); $this->checkRoleParameters('Object', $objectType, $objectId);

View File

@ -130,9 +130,6 @@ class Adapter {
} }
} }
/**
* @suppress SqlInjectionChecker
*/
public function insertIgnoreConflict(string $table,array $values) : int { public function insertIgnoreConflict(string $table,array $values) : int {
try { try {
$builder = $this->conn->getQueryBuilder(); $builder = $this->conn->getQueryBuilder();

View File

@ -41,9 +41,6 @@ class AdapterPgSql extends Adapter {
return $statement; return $statement;
} }
/**
* @suppress SqlInjectionChecker
*/
public function insertIgnoreConflict(string $table,array $values) : int { public function insertIgnoreConflict(string $table,array $values) : int {
if ($this->isPre9_5CompatMode() === true) { if ($this->isPre9_5CompatMode() === true) {
return parent::insertIgnoreConflict($table, $values); return parent::insertIgnoreConflict($table, $values);

View File

@ -279,7 +279,6 @@ class Connection extends ReconnectWrapper implements IDBConnection {
* @return int number of new rows * @return int number of new rows
* @throws \Doctrine\DBAL\DBALException * @throws \Doctrine\DBAL\DBALException
* @throws PreConditionNotMetException * @throws PreConditionNotMetException
* @suppress SqlInjectionChecker
*/ */
public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []) { public function setValues($table, array $keys, array $values, array $updatePreconditionValues = []) {
try { try {

View File

@ -254,8 +254,6 @@ class Cache implements ICache {
* *
* @return int file id * @return int file id
* @throws \RuntimeException * @throws \RuntimeException
*
* @suppress SqlInjectionChecker
*/ */
public function insert($file, array $data) { public function insert($file, array $data) {
// normalize file // normalize file
@ -613,7 +611,6 @@ class Cache implements ICache {
* @param string $targetPath * @param string $targetPath
* @throws \OC\DatabaseException * @throws \OC\DatabaseException
* @throws \Exception if the given storages have an invalid id * @throws \Exception if the given storages have an invalid id
* @suppress SqlInjectionChecker
*/ */
public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) { public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
if ($sourceCache instanceof Cache) { if ($sourceCache instanceof Cache) {

View File

@ -63,7 +63,6 @@ class Propagator implements IPropagator {
* @param string $internalPath * @param string $internalPath
* @param int $time * @param int $time
* @param int $sizeDifference number of bytes the file has grown * @param int $sizeDifference number of bytes the file has grown
* @suppress SqlInjectionChecker
*/ */
public function propagateChange($internalPath, $time, $sizeDifference = 0) { public function propagateChange($internalPath, $time, $sizeDifference = 0) {
// Do not propogate changes in ignored paths // Do not propogate changes in ignored paths
@ -156,7 +155,6 @@ class Propagator implements IPropagator {
/** /**
* Commit the active propagation batch * Commit the active propagation batch
* @suppress SqlInjectionChecker
*/ */
public function commitBatch() { public function commitBatch() {
if (!$this->inBatch) { if (!$this->inBatch) {

View File

@ -375,7 +375,6 @@ class UserMountCache implements IUserMountCache {
/** /**
* @param array $users * @param array $users
* @return array * @return array
* @suppress SqlInjectionChecker
*/ */
public function getUsedSpaceForUsers(array $users) { public function getUsedSpaceForUsers(array $users) {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();

View File

@ -216,8 +216,6 @@ class DBLockingProvider extends AbstractLockingProvider {
/** /**
* @param string $path * @param string $path
* @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
*
* @suppress SqlInjectionChecker
*/ */
public function releaseLock(string $path, int $type) { public function releaseLock(string $path, int $type) {
$this->markRelease($path, $type); $this->markRelease($path, $type);
@ -288,8 +286,6 @@ class DBLockingProvider extends AbstractLockingProvider {
/** /**
* release all lock acquired by this instance which were marked using the mark* methods * release all lock acquired by this instance which were marked using the mark* methods
*
* @suppress SqlInjectionChecker
*/ */
public function releaseAll() { public function releaseAll() {
parent::releaseAll(); parent::releaseAll();

View File

@ -171,7 +171,6 @@ class CleanTags implements IRepairStep {
* @param string $sourceId * @param string $sourceId
* @param string $sourceNullColumn If this column is null in the source table, * @param string $sourceNullColumn If this column is null in the source table,
* the entry is deleted in the $deleteTable * the entry is deleted in the $deleteTable
* @suppress SqlInjectionChecker
*/ */
protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) { protected function deleteOrphanEntries(IOutput $output, $repairInfo, $deleteTable, $deleteId, $sourceTable, $sourceId, $sourceNullColumn) {
$qb = $this->connection->getQueryBuilder(); $qb = $this->connection->getQueryBuilder();

View File

@ -66,7 +66,6 @@ class OldGroupMembershipShares implements IRepairStep {
* Must throw exception on error. * Must throw exception on error.
* *
* @throws \Exception in case of failure * @throws \Exception in case of failure
* @suppress SqlInjectionChecker
*/ */
public function run(IOutput $output) { public function run(IOutput $output) {
$deletedEntries = 0; $deletedEntries = 0;

View File

@ -56,7 +56,6 @@ class RepairInvalidShares implements IRepairStep {
/** /**
* Adjust file share permissions * Adjust file share permissions
* @suppress SqlInjectionChecker
*/ */
private function adjustFileSharePermissions(IOutput $out) { private function adjustFileSharePermissions(IOutput $out) {
$mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE; $mask = \OCP\Constants::PERMISSION_READ | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_SHARE;

View File

@ -115,7 +115,6 @@ class Throttler {
* @param string $action * @param string $action
* @param string $ip * @param string $ip
* @param array $metadata Optional metadata logged to the database * @param array $metadata Optional metadata logged to the database
* @suppress SqlInjectionChecker
*/ */
public function registerAttempt(string $action, public function registerAttempt(string $action,
string $ip, string $ip,

View File

@ -39,7 +39,6 @@ class PostgreSQL extends AbstractDatabase {
/** /**
* @param string $username * @param string $username
* @throws \OC\DatabaseSetupException * @throws \OC\DatabaseSetupException
* @suppress SqlInjectionChecker
*/ */
public function setupDatabase($username) { public function setupDatabase($username) {
try { try {

View File

@ -106,7 +106,6 @@ abstract class QBMapper {
* @param Entity $entity the entity that should be created * @param Entity $entity the entity that should be created
* @return Entity the saved entity with the set id * @return Entity the saved entity with the set id
* @since 14.0.0 * @since 14.0.0
* @suppress SqlInjectionChecker
*/ */
public function insert(Entity $entity): Entity { public function insert(Entity $entity): Entity {
// get updated fields to save, fields have to be set using a setter to // get updated fields to save, fields have to be set using a setter to
@ -145,7 +144,6 @@ abstract class QBMapper {
* @return Entity the saved entity with the (new) id * @return Entity the saved entity with the (new) id
* @throws \InvalidArgumentException if entity has no id * @throws \InvalidArgumentException if entity has no id
* @since 15.0.0 * @since 15.0.0
* @suppress SqlInjectionChecker
*/ */
public function insertOrUpdate(Entity $entity): Entity { public function insertOrUpdate(Entity $entity): Entity {
try { try {
@ -161,7 +159,6 @@ abstract class QBMapper {
* @param Entity $entity the entity that should be created * @param Entity $entity the entity that should be created
* @return Entity the saved entity with the set id * @return Entity the saved entity with the set id
* @since 14.0.0 * @since 14.0.0
* @suppress SqlInjectionChecker
*/ */
public function update(Entity $entity): Entity { public function update(Entity $entity): Entity {
// if entity wasn't changed it makes no sense to run a db query // if entity wasn't changed it makes no sense to run a db query