⚠️ This issue respects the following points: ⚠️
Bug description
The share reminders function added in 5e4a166 and d633b9b is quite practical so far, but we recently encountered a bug:
If files are uploaded to a folder shared internally or via email sharing, but then moved elsewhere by the person who created the share, the share recipient incorrectly receives a reminder, even though they have already correctly uploaded data. This leads to confusion.
Steps to reproduce
- Create an external email share or internal share with an expiration date for an empty folder with write permissions.
- As the share recipient, upload files to the folder via the share.
- The share creator moves the uploaded files to another folder, leaving the shared folder empty again.
- 24 hours before the set expiration date, the share recipient receives a reminder email.
Expected behavior
These are the conditions under which SharesReminderJob.php sends a reminder email:
- The share must have been made either to an internal user (TYPE_USER) or via email (TYPE_EMAIL).
- It must be a folder.
- The recipient must have write permissions (specifically: PERMISSION_CREATE) to upload files.
- Expiration date:
- The share must have a set expiration date.
- This expiration date must be within the next 24 hours (defined by SECONDS_BEFORE_REMINDER = 24 * 60 * 60).
- The date must not be in the past.
- The shared folder must be empty. The job checks whether there are already files in that folder. If it is empty, the reminder is triggered.
- The field reminder_sent in the database must be false. Once the email has been sent (or prepared for sending), this field is set to true to prevent duplicate emails.
As soon as files are uploaded by the share recipient, the field reminder_sent should be set to true or an additional condition should be added: if the share recipient has ever uploaded files before, the email should also not be sent.
Nextcloud Server version
35
Bug description
The share reminders function added in 5e4a166 and d633b9b is quite practical so far, but we recently encountered a bug:
If files are uploaded to a folder shared internally or via email sharing, but then moved elsewhere by the person who created the share, the share recipient incorrectly receives a reminder, even though they have already correctly uploaded data. This leads to confusion.
Steps to reproduce
Expected behavior
These are the conditions under which
SharesReminderJob.phpsends a reminder email:As soon as files are uploaded by the share recipient, the field
reminder_sentshould be set to true or an additional condition should be added: if the share recipient has ever uploaded files before, the email should also not be sent.Nextcloud Server version
35