-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[1.17.0-rc1] Package owned by a private owner can be retrieved without authentication #20093
Comments
Tested again and works as intended. Your browser/client has saved credentials it uses for the second request. Otherwise there would be no second request.
|
I was able to Edit: maybe related to #19583 |
If you have read access to the owner you can read the packages. The repository is irrelevant for the access check. |
I can confirm this issue still exists. I just build and pushed a docker image to a private repository and then was able to pull the package from a 2nd host without any logins. |
Still works for me. User
|
Hello, this issue has been inactive for more than 2 weeks. Feel free to re-open with a reproducible setup (eg: docker compose, detailed operation commands, like above) if there is still a problem. |
I am also able to pull packages that are in a private repo without any authentication. |
Can you provide a reproducible setup (eg: docker compose, detailed operation commands, like above)? |
Here is an example with me running the same commands as above.
My docker run is as follows:
|
@KN4CK3R do you have time to take a look? |
I take look later
|
I really don't know what's the problem here... Still works for me:
@wxiaoguang Are you able to reproduce this? |
The interesting thing is I was having the issue on the 1.17.x release but I have been using the dev branch and now the 1.18.0-rc0 and the issue is not reproducible for me anymore either. |
I have tested this now with 1.17.1-3 and every version responds with authentication required 🤷♂️ |
I was able to confirm that authentication is required for pulling when using a private organization as you demonstrated above. When setting the user visibility to private, auth is needed in order to pull packages. Is this the intended behavior that a public visibility user who has packages in a private repository can still pull packages without any authentication? |
A linked repository is irrelevant for the package registry. It's just a way to visually link a package to a repo. Only the package owner visibility is considered. There is an open issue to add more fine granular access control.
|
Understood! Thank you for explaining, since it is expected behavior I think we can close. |
Description
I upload a package using a curl command following the docs with my private account, I retrieve the package direct link using the Web UI. Then using this link with a browser private window I can download the package without any authentication.
Here are the container logs showing a 401 followed by a 200 and successful download:
Gitea Version
1.17.0-rc1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Docker with latest tag
Database
No response
The text was updated successfully, but these errors were encountered: