owncloud / owncloud/cdperf

API Failure: Share with new user

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
12
Forks
10
Avg merge
6h 23m
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Share with new user testcase in src/k6/src/test/issue/github/ocis/1399/share_with_new_user.ts and the request implementation in src/k6/src/lib/api/share.ts. Compare the failing request with the Owncloud web UI request, then determine whether OCS-APIREQUEST: true is needed only for sharing endpoints or globally. Done means the testcase passes against Owncloud 10.1.1 with the confirmed scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.