summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-03-20 00:21:14 +0100
committerArthur Schiwon <blizzz@owncloud.com>2014-04-09 11:31:56 +0200
commit8bb27551bde2d5aa516f4df2918ca3ed0ccd18b0 (patch)
tree072d0850127edfb28c5a6d7609c8a47a4334b090 /apps/user_ldap
parentfbb9e11a7e442bfef50c2d1a5c41aa0c349e7f22 (diff)
downloadnextcloud-server-8bb27551bde2d5aa516f4df2918ca3ed0ccd18b0.tar.gz
nextcloud-server-8bb27551bde2d5aa516f4df2918ca3ed0ccd18b0.zip
LDAP: make sure cache key for paged result cookie matches when limit or offset is null or 0
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 4d187bab8d5..b8e7e9bb670 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -1184,7 +1184,7 @@ class Access extends LDAPUtility {
}
$offset -= $limit;
//we work with cache here
- $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' . $limit . '-' . $offset;
+ $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' . intval($limit) . '-' . intval($offset);
$cookie = '';
if(isset($this->cookies[$cachekey])) {
$cookie = $this->cookies[$cachekey];
@@ -1206,7 +1206,7 @@ class Access extends LDAPUtility {
*/
private function setPagedResultCookie($base, $filter, $limit, $offset, $cookie) {
if(!empty($cookie)) {
- $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' .$limit . '-' . $offset;
+ $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' .intval($limit) . '-' . intval($offset);
$this->cookies[$cachekey] = $cookie;
}
}