No OCS message when updating a share
Open
Beginner friendly
Nobody has claimed this yet.
discussion
Type:Bug
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Request:
PUT /owncloud-core/ocs/v1.php/apps/files_sharing/api/v1/shares/391 HTTP/1.1
Host: localhost
User-Agent: GuzzleHttp/6.5.4 curl/7.68.0 PHP/7.3.19-1+ubuntu20.04.1+deb.sury.org+1
Authorization: Basic QWxpY2U6MTIzNDU2
OCS-APIREQUEST: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 14
permissions=31
Response:
<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message/>
<totalitems></totalitems>
<itemsperpage></itemsperpage>
</meta>
<data>
<id>391</id>
<share_type>0</share_type>
<uid_owner>Alice</uid_owner>
<displayname_owner>Alice Hansen</displayname_owner>
<permissions>31</permissions>
<stime>1594023692</stime>
<parent/>
<expiration/>
<token/>
<uid_file_owner>Alice</uid_file_owner>
<displayname_file_owner>Alice Hansen</displayname_file_owner>
<additional_info_owner/>
<additional_info_file_owner/>
<path>/Alice-folder</path>
<item_type>folder</item_type>
<mimetype>httpd/unix-directory</mimetype>
<storage_id>home::Alice</storage_id>
<storage>556</storage>
<item_source>2147537010</item_source>
<file_source>2147537010</file_source>
<file_parent>2147536991</file_parent>
<file_target>/Alice-folder</file_target>
<share_with>Brian</share_with>
<share_with_displayname>Brian Murphy</share_with_displayname>
<share_with_additional_info/>
<mail_send>0</mail_send>
<attributes/>
</data>
</ocs>
I would expect it to be
<message>OK</message>
probably that is the case in more places, the API tests don't check the message a lot
found it when looking into https://github.com/owncloud/ocis-reva/issues/332
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the OCS share-update entry point for the PUT shares endpoint and inspect the API tests, which currently do not assert response messages consistently. Confirm that a successful update returns OK, then add coverage for this response in the relevant API test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100