Sharing with LDAP Users not working on subsequent attempts when cache is enabled #21896

pako81 opened this Issue Jan 25, 2016 · 9 comments


None yet

6 participants

pako81 commented Jan 25, 2016

Steps to reproduce

  1. Having cache enabled: APCu 4.0.7, Redis 2.2.7
  2. Trying to share some files/folders with an LDAP User
  3. When typing the first letters of the Username, User is being correctly found on the first attempt
  4. However, when deleting the letters and searching again for the same User, this cannot be found and the search seems to be stuck
  5. This only happens when cache is enabled

Expected behaviour

LDAP User should also be found on the second attempt

Actual behaviour

See above

Server configuration

Operating system:

Debian Jessie

Web server:

Apache 2.4


Percona XtraDB 5.6.27

PHP version:


ownCloud version: (see ownCloud admin page)


Updated from an older ownCloud or fresh install:

Fresh install

Are you using external storage, if yes which one: local/smb/sftp/...


Are you using encryption: yes/no


Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...


@MorrisJobke can you maybe help here?


@PVince81 PVince81 added this to the 9.0-current milestone Jan 26, 2016
@PVince81 PVince81 added the bug label Jan 26, 2016

Tested on master with APCu 4.0.8 - can't reproduce. I will retry with 8.2.2


Same on v8.2.2 - it works just fine.

I use PHP 5.6.17.


Oh ... I just noticed that it breaks now. I will debug it.


I suspect that there is a problem with the caching mechanism in LDAP.

I noticed that it always fails if I enter the same search term the second time:

User: "Heather,..."

  • search term: "he" -> found
  • search term: "hea" -> found
  • remove "a" - search term: "he" -> not found
  • add "a" again - search term: "hea" -> not found

I debugged this a bit, but can't find anything suspicious. The cache key looks good - maybe APCu returns something wrong? @blizzz Can you have a look? You know better what you cached how.

blizzz commented Jan 29, 2016

@MorrisJobke I can confirm on master. Did you verify it on 8.2?

The problem is, when reading the after reading the value from the cache and unserializing it, it is turned into a stdClass instance instead of an associative array.

json_decode transforms this into an stdClass:

{"zombie_1102":"Neugebauer, Hassan","zombie_946670":"Neugebauer, Bekir"}

Please test the fix: #21998

@DeepDiver1975 DeepDiver1975 assigned MorrisJobke and unassigned blizzz Jan 29, 2016

Just to update everybody: #21999 contains the fix.

@nickvergessen nickvergessen reopened this Feb 1, 2016
@MorrisJobke MorrisJobke removed their assignment Feb 1, 2016
blizzz commented Feb 1, 2016

@nickvergessen you reopened because 8.2?




@nickvergessen you reopened because 8.2?

Not really needed. I track the backport PR usually. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment