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

Authenticated user cannot download file via public link share #10473

Closed
PrajwolAmatya opened this issue Feb 13, 2024 · 7 comments
Closed

Authenticated user cannot download file via public link share #10473

PrajwolAmatya opened this issue Feb 13, 2024 · 7 comments
Assignees
Labels
Type:Bug Something isn't working Type:Regression

Comments

@PrajwolAmatya
Copy link
Contributor

Describe the bug

When a user tries to download a file inside a folder whose public link is shared, the download fails with with status code 401 Unauthorized.

Steps to reproduce

As user Admin

  1. Create a folder test-folder
  2. Upload a file test-file.txt inside test-folder
  3. Create a public link share of test-folder

As user einstein

  1. Open the public link shared by admin
  2. try to download the file test-file.txt

Expected behavior

The file should be successfully downloaded.

Actual behavior

The download fails with status code 401.

Screencast.from.02-13-2024.05.12.03.PM.webm

Setup

ownCloud Web UI 8.0.0-rc.2
Infinite Scale 5.1.0-prealpha+01d40c278

@PrajwolAmatya PrajwolAmatya added the Type:Bug Something isn't working label Feb 13, 2024
@saw-jan saw-jan changed the title User cannot download file via public link share Authenticated user cannot download file via public link share Feb 16, 2024
@saw-jan
Copy link
Member

saw-jan commented Feb 16, 2024

  1. anonymous user can do the following to download drom public link: (works ✔️)

    curl "https://localhost:9200/remote.php/dav/public-files/CfcZNdrwEftaRng/test-file.txt" \
    -u public:<link-pass> -vk
    

    public doesn't have effect but I put it there to indicate public user

  2. authenticated user: (401 ❗)

    curl "https://localhost:9200/remote.php/dav/public-files/CfcZNdrwEftaRng/test-file.txt" \
    -u demo:demo -vk
    

    I wonder if that is supposed to work or not. So, ocis issue?
    UPDATE: ^ trying to access public link using user auth is not a valid thing to do

CC @ScharfViktor @kulmann

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Feb 16, 2024

it's not reproduced on: could reproduce it
ocis 5.1.0-prealpha+c3d895445
web 8.0.0-rc.4

maybe it was already fixed? I'm trying to find where

@saw-jan
Copy link
Member

saw-jan commented Feb 16, 2024

it's not reproduced on: ocis 5.1.0-prealpha+c3d895445 web 8.0.0-rc.4

maybe it was already fixed? I'm trying to find where

the issue is in the master branch.

ownCloud Web UI 8.0.0-rc.2
Infinite Scale 5.1.0-prealpha+01d40c278

@ScharfViktor
Copy link
Contributor

we have test for public https://github.com/owncloud/web/blob/master/tests/e2e/cucumber/features/smoke/shares/link.feature#L70-L72

I'll expand the suite for the athenticated user

@ScharfViktor
Copy link
Contributor

I'm not sure. Maybe it has something to do with: https://github.com/owncloud/ocis/pull/8385/files related?

@kulmann
Copy link
Member

kulmann commented Feb 19, 2024

fix on the way in #10494

@PrajwolAmatya
Copy link
Contributor Author

Fixed in #10494. So, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Something isn't working Type:Regression
Projects
Archived in project
Development

No branches or pull requests

4 participants