[Bug]: Users deleted by LDAP receiving notification emails
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 OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Users which were created and later deleted on the LDAP backend are still receiving notification emails. We just verified this behavior for announcement center notifications, but as the maintainers response on their repo suggests (see https://github.com/nextcloud/announcementcenter/issues/701), other parts/add-ons of Nextcloud might suffer from the same problem. In short terms, according to them, there is no proper way to tell what state an LDAP user is in, when it got deleted by the backend. The LDAP integration in this case puts a user in some sort of an "in between" state, as complete deletion is not performed by choice, but the user isn't disabled either. So users continue to exist until removed via CLI, but do never show up on the users overview page or anywhere else on the UI.
Steps to reproduce
- Create user via LDAP backend, make him part of any group.
- Wait for the user to appear on Nextcloud.
- Delete created user on LDAP backend again.
- Wait for the user to disappear on Nextcloud.
- Create an announcement which gets delivered to any group the deleted user is/was in.
- Given user will receive a notification email, even though he was deleted and does not show up in the UI anywhere, having the IT department to step in and delete the user properly via CLI.
Expected behavior
Deleted users shouldn't receive any notifications at all. They should eventually be shown as disabled users as well.
Installation method
Community Manual installation with Archive
Nextcloud Server version
26
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
Will be delivered when required.
List of activated Apps
Will be delivered when required.
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
Will be delivered when required.
Additional info
No response
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 source files or tests are named. Start by tracing the LDAP user lifecycle described in the reproduction steps, then follow how notification recipients are selected for announcement emails. Done means users deleted from LDAP no longer receive notifications and their resulting state matches the expected disabled-user behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100