diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-10-16 14:55:41 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-10-16 15:24:02 +0200 |
commit | b458ed9c82eeca4eafb4e86b7774ceba90130838 (patch) | |
tree | 2f7187dd4de5c1ee7a83247759c6d3b975872aa7 /lib/private/Group | |
parent | ad66b0f9ab010ee00d249d6f8512d30332e8a0af (diff) | |
download | nextcloud-server-b458ed9c82eeca4eafb4e86b7774ceba90130838.tar.gz nextcloud-server-b458ed9c82eeca4eafb4e86b7774ceba90130838.zip |
Properly escape column name in "createFunction" call
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Group')
-rw-r--r-- | lib/private/Group/Database.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php index 9bcb7eb3385..c77ae9e2ee8 100644 --- a/lib/private/Group/Database.php +++ b/lib/private/Group/Database.php @@ -387,9 +387,9 @@ class Database extends ABackend $this->fixDI(); $query = $this->dbConn->getQueryBuilder(); - $query->select($query->createFunction('COUNT(Distinct uid)')) + $query->select($query->createFunction('COUNT(DISTINCT ' . $query->getColumnName('uid') . ')')) ->from('preferences', 'p') - ->innerJoin('p', 'group_user', 'g', 'p.userid = g.uid') + ->innerJoin('p', 'group_user', 'g', $query->expr()->eq('p.userid', 'g.uid')) ->where($query->expr()->eq('appid', $query->createNamedParameter('core'))) ->andWhere($query->expr()->eq('configkey', $query->createNamedParameter('enabled'))) ->andWhere($query->expr()->eq('configvalue', $query->createNamedParameter('false'), IQueryBuilder::PARAM_STR)) |