From c9587cea76fb1b5e3d8f9edbb60934994860cd51 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 17 Dec 2015 12:29:55 +0100 Subject: [PATCH] disable Paged Search when chunksize is set to 0, fixes #21136 --- apps/user_ldap/lib/configuration.php | 3 +++ apps/user_ldap/lib/connection.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/user_ldap/lib/configuration.php b/apps/user_ldap/lib/configuration.php index daec2bed13..418a2bfc01 100644 --- a/apps/user_ldap/lib/configuration.php +++ b/apps/user_ldap/lib/configuration.php @@ -28,6 +28,9 @@ namespace OCA\user_ldap\lib; +/** + * @property int ldapPagingSize holds an integer + */ class Configuration { protected $configPrefix = null; diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index c485ac7439..53c9b3790a 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -85,11 +85,12 @@ class Connection extends LDAPUtility { if($memcache->isAvailable()) { $this->cache = $memcache->create(); } - $this->hasPagedResultSupport = - $this->ldap->hasPagedResultSupport(); $helper = new Helper(); $this->doNotValidate = !in_array($this->configPrefix, $helper->getServerConfigurationPrefixes()); + $this->hasPagedResultSupport = + intval($this->configuration->ldapPagingSize) !== 0 + || $this->ldap->hasPagedResultSupport(); } public function __destruct() {