owncloud / owncloud/core

User deletion does not remove shares

Open
#40,067 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. As admin create an "empty folder" and share with user intermediate
  2. As user intermediate re-share this folder to user test
  3. As user test you will see the shared "empty folder"
  4. As admin delete user intermediate
  5. As user test the directory "empty folder" still exists.
  6. In the share tab there is still visible that the folder was shared by intermediate
Expected behaviour

Shares by deleted users are deleted when a user is deleted, since there it says:

You are about to delete a user. This action can't be undone and is permanent. All user data, files and shares will be deleted. Are you sure that you want to permanently delete intermediate?

Actual behaviour

Shares by deleted users still exist.

This leads to unpredictable consequences since affected shares cannot be removed any longer and there's no chance to change share permissions of such broken shares.

Additionally an occ:maintenance repair does not remove that broken share either.

Server configuration

Operating system:
Ubuntu 20.04.4

Web server:
apache 2.4.41

Database:
mariadb 10.3.34

PHP version:
php 7.4.29

ownCloud version: (see ownCloud admin page)
10.9.1.2

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
ownCloud download page

Signing status (ownCloud 9.0 and above):
fine

The content of config/config.php:
default setup after initial installation

List of activated apps:
only apps installed by default

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

Are you using encryption: yes/no
no

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

Client configuration

irrelevant

ownCloud log (data/owncloud.log)

no related log entries

Browser log

no related log entries

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by reproducing the intermediate-user deletion scenario and trace the user deletion and share-cleanup entry points. Done means shares created by the deleted user, including re-shares visible to test, are removed and the documented maintenance repair behavior is addressed.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.