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
Shares via the "Create file request" feature are created with "expiration time", even if the expiration time is removed from the UI"
Steps to reproduce
- Go to
Administrations settings->Sharing
and enable "Set default expiration date for share via link or email" - In Files App click
New->Create file request
- Untick "Set a submission expiration date" during creation.
- Share is created with "expiration date" althougth the checkbox was unticked and the "Enforce expiration date" is not enabled.
Expected behavior
Share should be created without "expiration date"
Nextcloud Server version
master
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
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
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
Reproducable on both master
and stable30
branches.
Request is send correctly from Frontend to Backend without expireDate
present:
POST https://stable30.local/ocs/v2.php/apps/files_sharing/api/v1/shares
:
{"shareType":4,"permissions":4,"label":"","path":"/avx","note":"","shareWith":"","attributes":"[{\"value\":true,\"key\":\"enabled\",\"scope\":\"fileRequest\"}]"}
Problem is somewhere in the backend, imho.
Edited: Found such code in the backend:
server/apps/files_sharing/lib/Controller/ShareAPIController.php
Lines 641 to 657 in edeccc8
Looks like I was wrong, and it is Frontend, that should sent an empty string in expireDate