Skip to content

Authorization for tus-uploads on password protected links #3588

Closed

Description

@JammingBen

When I'm uploading a file via tus to a password protected public link, the initial POST request succeeds without problems: https://localhost:9200/remote.php/dav/public-files/WoXYZdRaXgPZEZZ/. The auth header is e.g. Basic cHVibGljOnRlc3Q=.

Now the second request, a HEAD request, with the exact same auth header stays in a pending state in the browser network tab. Instead, the classic Basic-Auth-Browser-Window pops up and asks for credentials as the backend response includes Www-Authenticate in its response headers.

The oCIS error log prints ERR error fetching from accounts-service error="{\"id\":\"com.owncloud.api.accounts\",\"code\":401,\"detail\":\"account not found or invalid credentials\",\"status\":\"Unauthorized\"}" query="login eq 'public' and password eq 'test'" service=proxy

I'm not a 100% sure if this is a frontend or a backend issue. But the requests seem to be correct for me, so my first impression is that something in oCIS goes wrong here.

Edit: I also ran the head request via curl, which is giving me 401 Unauthorized as well.

Activity

  1. micbar commented on May 5, 2022

    @micbar
    Contributor
  2. added
    Priority:p2-high
    OCIS-Fastlane
    on May 5, 2022
  3. kobergj commented on May 5, 2022

    @kobergj
    Contributor

    Fix was merged. Problem is gone with current master

    @JammingBen we can remove the workaround now

  4. JammingBen commented on May 6, 2022

    @JammingBen
    ContributorAuthor

    Thx, works fine 👍 See owncloud/web#6890 for frontend follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OCIS-FastlanePriority:p2-highType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions