From e50cfc849936e6ea25d13c43a9c85add9f009542 Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 3 Aug 2025 22:14:13 +0200 Subject: [PATCH] fix: migrate new Github release assets (#8771) - It seems that mid-May (according to some system notices in Codeberg) Github started (or converted all) release asssets to be made available under `https://release-assets.githubusercontent.com/`. - Update the migration code to allow this baseURL for Github release assets. - Resolves Codeberg/Community#2061 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8771 Reviewed-by: Earl Warren Co-authored-by: Gusted Co-committed-by: Gusted --- services/migrations/github.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/migrations/github.go b/services/migrations/github.go index 9721c86180..317eb568b5 100644 --- a/services/migrations/github.go +++ b/services/migrations/github.go @@ -364,7 +364,8 @@ func (g *GithubDownloaderV3) convertGithubRelease(rel *github.RepositoryRelease) // Prevent open redirect if !hasBaseURL(redirectURL, g.baseURL) && - !hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") { + !hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") && + !hasBaseURL(redirectURL, "https://release-assets.githubusercontent.com/") { WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.GetID(), g, redirectURL) return io.NopCloser(strings.NewReader(redirectURL)), nil