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

apps/files_sharing/api/v1/remote_shares/{id} returns empty content for not accepted shares #34636

Closed
individual-it opened this issue Feb 27, 2019 · 7 comments · Fixed by #37216
Labels

Comments

@individual-it
Copy link
Member

Steps to reproduce

  1. from server1 share a folder to server2
  2. on server2 do not accept the share
  3. on server2 find the share-id curl -u admin:admin http://localhost/owncloud-core/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/pending
  4. try to get information about that share curl -u admin:admin http://localhost/owncloud-core/ocs/v1.php/apps/files_sharing/api/v1/remote_shares/22 -v

Expected behaviour

Error saying that the share is not accepted
OR
information of the share shown

Actual behaviour

HTTP code 200 but empty content

Server configuration

Operating system:
Ubuntu 18.04
Web server:
Apache2
Database:
SQLite
PHP version:
7.2
ownCloud version: (see ownCloud admin page)
11.0.0
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git

@individual-it
Copy link
Member Author

possible related to #34566

@ownclouders
Copy link
Contributor

GitMate.io thinks the contributor most likely able to help you is @phil-davis.

Possibly related issues are #34626 (accesing /ocs/v1.php/apps/files_sharing/api/v1/shares with invalid credentials gives an empty reply), #18530 (apps/files_sharing/api/externalShares 404 (Not Found)), #15508 (Empty content notice does not show for shared links), #4435 (Accept incoming shares), and #31423 ([Stable10] api test api sharing v1).

@DeepDiver1975
Copy link
Member

@individual-it can you glue all these tests into some api acceptance tests? THX

@individual-it
Copy link
Member Author

@DeepDiver1975 just doing it, trying to fill the gaps in #34566 (comment)
first part was #34627 , more will follow

@individual-it
Copy link
Member Author

log output

{"reqId":"jEUc6cUnaiVutribdDtn","level":3,"time":"2019-03-05T04:33:09+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"PHP","method":"GET","url":"\/owncloud-core\/ocs\/v1.php\/apps\/files_sharing\/api\/v1\/remote_shares\/52","message":"Call to a member function getMimetype() on boolean at \/home\/artur\/www\/owncloud-core\/apps\/files_sharing\/lib\/API\/Remote.php#110"}

@individual-it
Copy link
Member Author

with PHP 5.6 and stable10 that issue results in a HTTP/1.0 500 Internal Server Error

@VicDeo
Copy link
Member

VicDeo commented Apr 6, 2020

still reproducible:

{"reqId":"jeeKxCEMNmITSnccyKE4",
"level":3,
"time":"2020-04-06T10:12:08+00:00",
"remoteAddr":"127.0.0.1",
"user":"admin",
"app":"PHP",
"method":"GET",
"url":"\/ocs\/v1.php\/apps\/files_sharing\/api\/v1\/remote_shares\/32",
"message":"Error: Call to a member function getMimetype() on boolean at \/apps\/files_sharing\/lib\/Controller\/RemoteOcsController.php#213"}

we shouldn't try to read FileInfo for pending shares.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants