Skip to content

fix(api): stop leaking private repo metadata after access revocation#38321

Open
bircni wants to merge 1 commit into
go-gitea:mainfrom
bircni:fix-starred-private-repo-access-leak
Open

fix(api): stop leaking private repo metadata after access revocation#38321
bircni wants to merge 1 commit into
go-gitea:mainfrom
bircni:fix-starred-private-repo-access-leak

Conversation

@bircni

@bircni bircni commented Jul 3, 2026

Copy link
Copy Markdown
Member

The /user/starred and /user/subscriptions endpoints returned private repositories a user had starred/watched even after their access to those repositories was revoked, still exposing the repository name, description and visibility (including later metadata changes).

Private repositories in the starred/watched queries are now gated on the actor's current access via AccessibleRepositoryCondition, so users who no longer have access no longer receive the metadata. Public repositories and public-only tokens are unaffected.

The starred (`/user/starred`) and subscriptions (`/user/subscriptions`)
endpoints returned private repositories a user had starred/watched even
after their access to those repositories was revoked, exposing repo name,
description and visibility.

Gate private repositories in the starred/watched queries on the actor's
current access via AccessibleRepositoryCondition, so revoked users no
longer receive their metadata.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 3, 2026
@bircni bircni added the backport/v1.27 This PR should be backported to Gitea 1.27 label Jul 3, 2026
@bircni bircni mentioned this pull request Jul 7, 2026
22 tasks
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v1.27 This PR should be backported to Gitea 1.27 lgtm/need 1 This PR needs approval from one additional maintainer to be merged. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants