Skip to content

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

Closed

Description

@pako81

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

Database:

Percona XtraDB 5.6.27

PHP version:

5.6

ownCloud version: (see ownCloud admin page)

8.2.2

Updated from an older ownCloud or fresh install:

Fresh install

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

local

Are you using encryption: yes/no

no

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

LDAP

@MorrisJobke can you maybe help here?

00004656

Activity

  1. added this to the milestone on Jan 26, 2016
  2. MorrisJobke commented on Jan 27, 2016

    @MorrisJobke
    Contributor

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

  3. MorrisJobke commented on Jan 27, 2016

    @MorrisJobke
    Contributor

    Same on v8.2.2 - it works just fine.

    I use PHP 5.6.17.

  4. MorrisJobke commented on Jan 27, 2016

    @MorrisJobke
    Contributor

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

  5. MorrisJobke commented on Jan 27, 2016

    @MorrisJobke
    Contributor

    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.

  6. blizzz commented on Jan 29, 2016

    @blizzz
    Contributor

    @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

  7. added a commit that references this issue on Jan 29, 2016
    e4ad4c7
  8. MorrisJobke commented on Jan 29, 2016

    @MorrisJobke
    Contributor

    Just to update everybody: #21999 contains the fix.

  9. added a commit that references this issue on Feb 1, 2016
    7f327ab
  10. removed their assignment
    on Feb 1, 2016
  11. blizzz commented on Feb 1, 2016

    @blizzz
    Contributor

    @nickvergessen you reopened because 8.2?

  12. nickvergessen commented on Feb 1, 2016

    @nickvergessen
    Contributor

    yes

  13. MorrisJobke commented on Feb 1, 2016

    @MorrisJobke
    Contributor

    @nickvergessen you reopened because 8.2?

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

  14. added a commit that references this issue on Feb 24, 2016
    a233875
  15. lock commented on Aug 6, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  16. locked as resolved and limited conversation to collaborators on Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions