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

accesing /ocs/v1.php/apps/files_sharing/api/v1/shares with invalid credentials gives an empty reply #34626

Closed
individual-it opened this issue Feb 27, 2019 · 4 comments
Labels

Comments

@individual-it
Copy link
Member

Steps to reproduce

  1. curl -u admin:wrong http://localhost/owncloud-core/ocs/v2.php/apps/files_sharing/api/v1/shares -v

maybe related to #34566

Expected behaviour

HTTP error 401
xml response with error code

Actual behaviour

HTTP code 200
empty content
TypeError message shown in the logs

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

Logs

ownCloud log (data/owncloud.log)

{"reqId":"950NQUnYCTUoEsBpAAHB","level":3,"time":"2019-02-27T07:55:56+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\/owncloud-core\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares","message":"TypeError: Argument 8 passed to OCA\\Files_Sharing\\Controller\\Share20OcsController::__construct() must be an instance of OCP\\IUser, null given, called in \/home\/artur\/www\/owncloud-core\/apps\/files_sharing\/lib\/AppInfo\/Application.php on line 94 at \/home\/artur\/www\/owncloud-core\/apps\/files_sharing\/lib\/Controller\/Share20OcsController.php#83"}
@ownclouders
Copy link
Contributor

GitMate.io thinks the contributor most likely able to help you is @ownclouders.

Possibly related issues are #27400 (OCS Share API), #17166 (OCS Share API Date improvements), #21798 (OCS Sharing API v2), #18117 ([OCS-API] get sharing recipients), and #18530 (apps/files_sharing/api/externalShares 404 (Not Found)).

@phil-davis
Copy link
Contributor

Note: this issue is only seen in core master
In core stable10 the expected result happens.

@individual-it
Copy link
Member Author

@DeepDiver1975 you have merged #34622 closing this issue?

@VicDeo
Copy link
Member

VicDeo commented Apr 6, 2020

Tested with master

 HTTP/1.1 401 Unauthorized

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>997</statuscode>
  <message>Unauthorised</message>
  <totalitems></totalitems>
  <itemsperpage></itemsperpage>
 </meta>
 <data/>
</ocs>

@VicDeo VicDeo closed this as completed Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants