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

API Failure: Share with new user #28

Open
rpocklin opened this issue Mar 17, 2022 · 1 comment
Open

API Failure: Share with new user #28

rpocklin opened this issue Mar 17, 2022 · 1 comment

Comments

@rpocklin
Copy link
Contributor

I have attempted using a sharing test with our Owncloud 10.1.1 instance (which already works for create / upload testcases in this repository).

but consistently to receive a 401 Unauthorized response, even when the headers included a valid Authorization header (basic auth).

The following was the response body returned:

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

Testcase
Share with new user

By comparing the request with that in the Owncloud web user interface, the frontend is also sending the header
OCS-APIREQUEST: true

Once I change share.ts to include this header specifically, and re-compile and re-run, the test passes without any issue.

Is this required to be added to specific endpoints, or at a global level? I'm unsure why this is required in this case and wanted to confirm more details before submitting a PR.

@fschade
Copy link
Collaborator

fschade commented Mar 30, 2023

@rpocklin can you try #45, should work there.

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

No branches or pull requests

2 participants