[Bug]: Group removed from LDAP left in shares
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
(1) When LDAP group that is used in nc file shares is removed from LDAP, it is not removed from nc shares configuration.
(2) When LDAP group with same name is recreated in LDAP - same group will be silently applied to exisiting shares in nc with this group. This may be security problem (i.e. user was sharing data with some users and then group was removed and users didn't notice this and after year group is recreated with same name and different members that should not have access to old shares).
Steps to reproduce
- Create group "test" in LDAP with yourself only.
- Create share "Test share" with group "test" in nc files.
- Remove group "test" from LDAP.
- Create group "test" in LDAP again with yourself and Another User.
- Members of new "test" group (i.e. Another User) will have access to "Test share" (i.e. as pending) that was created for old "test" group (before deletion) without "Another User".
Expected behavior
LDAP group is removed from nc shares after removing from LDAP. New group from LDAP with same name should be treated as new group in nc and not inherit old share configuration from previous LDAP group with same name.
Installation method
None
Nextcloud Server version
25
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
Integration with OpenLDAP.
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
Similar problem:
https://help.nextcloud.com/t/delete-ldap-group/31809
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reproducing the LDAP group removal and same-name recreation sequence, then trace the handling of LDAP groups in file shares; done means removed groups no longer remain in shares and recreated groups do not inherit the old share configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authorization, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100