summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-04-18 10:32:15 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-04-20 21:50:28 +0200
commit62a59854f0478130c23bc7b8bbf4064b38bbeaf8 (patch)
tree0d2101e019491d560560d36ca9700e2e016801e8 /apps/user_ldap/tests
parent85d809c0d3cda16e9ef12f57c4225c868b17915b (diff)
downloadnextcloud-server-62a59854f0478130c23bc7b8bbf4064b38bbeaf8.tar.gz
nextcloud-server-62a59854f0478130c23bc7b8bbf4064b38bbeaf8.zip
Fix LDAP race conditions
* getFromCache is wrapped in isCached * inbetween the two calls the cache entry hits it's TTL * getFromCache returns null * this fix only checkes if the returned value is null and return only non-null values
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r--apps/user_ldap/tests/group_ldap.php4
1 files changed, 0 insertions, 4 deletions
diff --git a/apps/user_ldap/tests/group_ldap.php b/apps/user_ldap/tests/group_ldap.php
index 667a1c3acb2..51bb1d84732 100644
--- a/apps/user_ldap/tests/group_ldap.php
+++ b/apps/user_ldap/tests/group_ldap.php
@@ -294,10 +294,6 @@ class Test_Group_Ldap extends \Test\TestCase {
$uid = 'someUser';
$gid = 'someGroup';
$cacheKey = 'inGroup'.$uid.':'.$gid;
- $access->connection->expects($this->once())
- ->method('isCached')
- ->with($cacheKey)
- ->will($this->returnValue(true));
$access->connection->expects($this->once())
->method('getFromCache')