aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-16 14:55:41 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-10-16 15:24:02 +0200
commitb458ed9c82eeca4eafb4e86b7774ceba90130838 (patch)
tree2f7187dd4de5c1ee7a83247759c6d3b975872aa7 /apps/user_ldap/lib
parentad66b0f9ab010ee00d249d6f8512d30332e8a0af (diff)
downloadnextcloud-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 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/Mapping/AbstractMapping.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/Mapping/AbstractMapping.php b/apps/user_ldap/lib/Mapping/AbstractMapping.php
index c7d737a7631..c3f09fd6caa 100644
--- a/apps/user_ldap/lib/Mapping/AbstractMapping.php
+++ b/apps/user_ldap/lib/Mapping/AbstractMapping.php
@@ -311,7 +311,7 @@ abstract class AbstractMapping {
*/
public function count() {
$qb = $this->dbc->getQueryBuilder();
- $query = $qb->select($qb->createFunction('COUNT(`ldap_dn`)'))
+ $query = $qb->select($qb->createFunction('COUNT(' . $qb->getColumnName('ldap_dn') . ')'))
->from($this->getTableName());
$res = $query->execute();
$count = $res->fetchColumn();