Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Sharing Dialog][oC 8.2.X] Public links cannot be deleted/edited #5777

Closed
SamuAlfageme opened this issue May 17, 2017 · 3 comments
Closed

[Sharing Dialog][oC 8.2.X] Public links cannot be deleted/edited #5777

SamuAlfageme opened this issue May 17, 2017 · 3 comments
Assignees
Labels
feature:sharing ReadyToTest QA, please validate the fix/enhancement sev4-low type:bug
Milestone

Comments

@SamuAlfageme
Copy link
Contributor

SamuAlfageme commented May 17, 2017

Actual behavior

The new sharing dialog (#5695) is not including the <share_id> at the end of the URL onDELETE/PUT requests.

Client Request:

curl \
    -H 'Ocs-APIREQUEST:true' \
    -H 'Content-Type:application/x-www-form-urlencoded' \
    -H 'User-Agent:Mozilla/5.0 (Macintosh) mirall/2.4.0-nightly20170509 (build 4255)' \
    [...]
    -H 'Host:<server>' \
    -X DELETE 'http://<server>/ocs/v1.php/apps/files_sharing/api/v1/shares/?format=json'

Server Reply:

{
    "ocs": {
        "data": [],
        "meta": {
            "message": "Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT:\n",
            "status": "failure",
            "statuscode": 999
        }
    }
}

screenshot 2017-05-17 09 53 10

Expected behavior

The right (legacy) endpoint would be:

-X DELETE 'http://<server>/ocs/v1.php/apps/files_sharing/api/v1/shares/<share_id>?format=json'

oC Server > 9.0 is not affected by this.

Steps to reproduce

  1. Create a new public link on a server older than 9.0
  2. Remove it
@SamuAlfageme SamuAlfageme added this to the 2.4.0 milestone May 17, 2017
@SamuAlfageme SamuAlfageme changed the title [Sharing Dialog][oC 8.2.X] Public links cannot be deleted [Sharing Dialog][oC 8.2.X] Public links cannot be deleted/edited May 17, 2017
@ckamm ckamm self-assigned this May 18, 2017
@ckamm
Copy link
Contributor

ckamm commented May 18, 2017

Nice catch, I'll take care of it.

ckamm added a commit that referenced this issue May 18, 2017
Older ownCloud servers like 8.2.0 used to use integer ids.

This broke when switching to QJson because toString() on JSON
values is strict and returns "" for integers.
@ckamm
Copy link
Contributor

ckamm commented May 18, 2017

PR: #5780

@SamuAlfageme SamuAlfageme added the ReadyToTest QA, please validate the fix/enhancement label May 19, 2017
guruz pushed a commit that referenced this issue May 22, 2017
Older ownCloud servers like 8.2.0 used to use integer ids.

This broke when switching to QJson because toString() on JSON
values is strict and returns "" for integers.
@SamuAlfageme
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:sharing ReadyToTest QA, please validate the fix/enhancement sev4-low type:bug
Projects
None yet
Development

No branches or pull requests

2 participants