Closed
Description
openedon Mar 18, 2021
Steps
- Go to the settings page
- For internal shares, set expiration days to "7" and enable enforcement
- For link shares, set expiration days to "3" (a lower value) and enable enforcement.
- Go to files app
- Create a folder "test"
- Share "test" with another user
- Check expiration date and confirm that it's 7 days in the future from today
- Now edit the date and set it to 6 days and confirm
Expected result
6 days is allowed too
Actual result
Error messages from the link share appears with a 3 day limit:
Version
22.0.0 alpha git master a186d08
Analysis
The reason is because of a code mix up in Share20/Manager.php where the wrong validator is used: https://github.com/nextcloud/server/blob/master/lib/private/Share20/Manager.php#L978
validateExpirationDate
is actually for links.
validateExpirationDateInternal
is for user and group shares.
Due to confusing name
Found while working on #25320 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment