-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
API returns archive links for repo tags even if archives are disabled. #32159
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
Labels
topic/api
Concerns mainly the API
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Milestone
Comments
I'd be happy to make a PR (with some guidance). Where should I ask for pointers? |
I have a PR for this change here: #34324 |
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
May 1, 2025
…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
lunny
pushed a commit
that referenced
this issue
May 1, 2025
…bled (#34324) (#34338) 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 Co-authored-by: Tobias Balle-Petersen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic/api
Concerns mainly the API
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Uh oh!
There was an error while loading. Please reload this page.
Description
In Gitea version 1.22.2, the API endpoint /repos/{owner}/{repo}/tags returns links in properties tarball_url & zipball_url even if archives has been disabled with DISABLE_DOWNLOAD_SOURCE_ARCHIVES.
I think the value should be the empty string, if downloading if archives is disabled. This would match the GUI, where the UI for downloading archives is removed.
This behavior might well be the same for other API endpoints containing links to downloadable archives.
I'd be happy to make a PR for this, if there is support for changing the current behavior.
Gitea Version
1.22.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?
Kubernetes
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: