Skip to content

fix: do not return archive download URLs in API if downloads are disabled (#34324) #34338

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented May 1, 2025

Backport #34324 by @tobiasbp

If archive downloads are are disabled using DISABLE_DOWNLOAD_SOURCE_ARCHIVES, archive links are still returned by the API.

This PR changes the data returned, so the fields zipball_url and tarball_url are omitted if archive downloads have been disabled.

Resolve #32159

…bled (go-gitea#34324)

If archive downloads are are disabled using
_DISABLE_DOWNLOAD_SOURCE_ARCHIVES_, archive links are still returned by
the API.

This PR changes the data returned, so the fields _zipball_url_ and
_tarball_url_ are omitted if archive downloads have been disabled.

Resolve go-gitea#32159
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 1, 2025
@GiteaBot GiteaBot added this to the 1.24.0 milestone May 1, 2025
@GiteaBot GiteaBot requested review from delvh and lunny May 1, 2025 18:42
@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 May 1, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 1, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 1, 2025
@lunny lunny merged commit c95cb7c into go-gitea:release/v1.24 May 1, 2025
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants