Container packages ignore REQUIRE_SIGNIN_VIEW #12361

Closed
opened 2025-11-02 10:07:02 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @Shuenhoy on GitHub (Jan 21, 2024).

Description

Our site has enabled REQUIRE_SIGNIN_VIEW, however, we can still docker pull a public image.
This problem had been reported in #20863 and #20873 seemed to have fixed this for other types of package, but not for container.

Gitea Version

1.21.2

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

Database

PostgreSQL

Originally created by @Shuenhoy on GitHub (Jan 21, 2024). ### Description Our site has enabled `REQUIRE_SIGNIN_VIEW`, however, we can still `docker pull` a public image. This problem had been reported in #20863 and #20873 seemed to have fixed this for other types of package, but not for container. ### Gitea Version 1.21.2 ### 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 ### Database PostgreSQL
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 10:07:03 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Jan 21, 2024):

It does not ignore that flag:
1df06e3f39/modules/context/package.go (L95-L98)

Did you perform a docker logout?

@KN4CK3R commented on GitHub (Jan 21, 2024): It does not ignore that flag: https://github.com/go-gitea/gitea/blob/1df06e3f399307c14b60a2b88e1b26cedc1ae2f9/modules/context/package.go#L95-L98 Did you perform a docker logout?
Author
Owner

@Shuenhoy commented on GitHub (Jan 21, 2024):

Hi @KN4CK3R, please check this snapshot:

image

Or am I missing something and the login information can be stored somewhere else?

@Shuenhoy commented on GitHub (Jan 21, 2024): Hi @KN4CK3R, please check this snapshot: ![image](https://github.com/go-gitea/gitea/assets/2196156/03b70212-8d36-418d-ba0a-2d77998ef7a4) Or am I missing something and the login information can be stored somewhere else?
Author
Owner

@KN4CK3R commented on GitHub (Jan 21, 2024):

No, my bad... The container registry uses the internal ghost user for anonymous requests and the ghost user is not nil. Therefore the test does not return no access rights... I will send a fix soon.

@KN4CK3R commented on GitHub (Jan 21, 2024): No, my bad... The container registry uses the internal ghost user for anonymous requests and the ghost user is not `nil`. Therefore the test does not return no access rights... I will send a fix soon.
Author
Owner

@KN4CK3R commented on GitHub (Jan 21, 2024):

Fixed in #28877. Thank you for the report.

@KN4CK3R commented on GitHub (Jan 21, 2024): Fixed in #28877. Thank you for the report.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 29, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Feb 29, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12361