diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-15 12:14:17 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-15 12:14:17 +0100 |
commit | e9eeb3607fe0ba15413c1c22b1120fc53aaed6dc (patch) | |
tree | 1da9445e8bc8bb499cf7c7639629dbf612d9b5cd /apps/files_external | |
parent | f8180579d03fcd10ab8f92f1ecb27899436c7653 (diff) | |
parent | 6b4117df34232fbe9da49fca9a813bc8c5ec226d (diff) | |
download | nextcloud-server-e9eeb3607fe0ba15413c1c22b1120fc53aaed6dc.tar.gz nextcloud-server-e9eeb3607fe0ba15413c1c22b1120fc53aaed6dc.zip |
Merge pull request #23074 from owncloud/issue-22835-correctly-use-querybuilder-api
Correctly escape join statements and use selectAlias
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/service/dbconfigservice.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/service/dbconfigservice.php b/apps/files_external/service/dbconfigservice.php index 5bbc3b23682..a37c541f045 100644 --- a/apps/files_external/service/dbconfigservice.php +++ b/apps/files_external/service/dbconfigservice.php @@ -92,7 +92,7 @@ class DBConfigService { protected function getForQuery(IQueryBuilder $builder, $type, $value) { $query = $builder->select(['m.mount_id', 'mount_point', 'storage_backend', 'auth_backend', 'priority', 'm.type']) ->from('external_mounts', 'm') - ->innerJoin('m', 'external_applicable', 'a', 'm.mount_id = a.mount_id') + ->innerJoin('m', 'external_applicable', 'a', $builder->expr()->eq('m.mount_id', 'a.mount_id')) ->where($builder->expr()->eq('a.type', $builder->createNamedParameter($type, IQueryBuilder::PARAM_INT))); if (is_null($value)) { @@ -148,7 +148,7 @@ class DBConfigService { $query = $builder->select(['m.mount_id', 'mount_point', 'storage_backend', 'auth_backend', 'priority', 'm.type']) ->from('external_mounts', 'm') - ->innerJoin('m', 'external_applicable', 'a', 'm.mount_id = a.mount_id') + ->innerJoin('m', 'external_applicable', 'a', $builder->expr()->eq('m.mount_id', 'a.mount_id')) ->where($builder->expr()->eq('a.type', $builder->createNamedParameter($type, IQueryBuilder::PARAM_INT))) ->andWhere($builder->expr()->in('a.value', $params)); $query->andWhere($builder->expr()->eq('m.type', $builder->expr()->literal(self::MOUNT_TYPE_ADMIN, IQueryBuilder::PARAM_INT))); |