[Bug]: Share API default to wrong permissions #37774
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
25-feedback
bug
feature: sharing
needs review
Needs review to determine if still applicable
Bug description
According to our documentation, when creating a public link with our API the permissions should default to "1" (read only) but it will be set to 17 (1 = read, 16= share). Luckily the combination doesn't hurt, but it is still wrong.
Also it seems that all permissions send along the request, e.g.
curl -k -X POST -d "path=<path to folder>" -d "shareType=3" -d "permissions=4" -H "OCS-APIRequest: true" -u <user>:<password> http://<nc domain>/ocs/v2.php/apps/files_sharing/api/v1/shares
get ignored even that "permissions" is a valid parameter and "4" would be a valid value for a folder (file drop)Steps to reproduce
curl -k -X POST -d "path=<path to folder>" -d "shareType=3" -d "permissions=4" -H "OCS-APIRequest: true" -u <user>:<password> http://<nc domain>/ocs/v2.php/apps/files_sharing/api/v1/shares
)Expected behavior
default permission is "1" if no permission is given, otherwise permission given by the user gets applied
Installation method
None
Nextcloud Server version
25
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: