Skip to content

Commit 9ce1cae

Browse files
committed
Merge branch 'main' into squash-merge-msg
* main: [skip ci] Updated translations via Crowdin Fix LFS range size header response (go-gitea#35277) Skip "parentsigned" check when the repo is empty (go-gitea#35292) [skip ci] Updated translations via Crowdin Fix GitHub release assets URL validation (go-gitea#35287) nix flake use go1.25 (go-gitea#35288) go1.25.0 (go-gitea#35262)
2 parents 71480fc + 6619b1e commit 9ce1cae

File tree

10 files changed

+252
-245
lines changed

10 files changed

+252
-245
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Dockerfile.rootless

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM docker.io/library/golang:1.24-alpine3.22 AS build-env
2+
FROM docker.io/library/golang:1.25-alpine3.22 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY=${GOPROXY:-direct}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SHASUM ?= shasum -a 256
2323
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
2424
COMMA := ,
2525

26-
XGO_VERSION := go-1.24.x
26+
XGO_VERSION := go-1.25.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker@v3

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
with pkgs;
1616
let
1717
# only bump toolchain versions here
18-
go = go_1_24;
18+
go = go_1_25;
1919
nodejs = nodejs_24;
2020
python3 = python312;
2121

options/locale/locale_zh-CN.ini

Lines changed: 228 additions & 228 deletions
Large diffs are not rendered by default.

services/asymkey/sign.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,22 @@ Loop:
290290
return false, nil, nil, err
291291
}
292292
defer gitRepo.Close()
293-
commit, err := gitRepo.GetCommit(parentCommit)
293+
isEmpty, err := gitRepo.IsEmpty()
294294
if err != nil {
295295
return false, nil, nil, err
296296
}
297-
if commit.Signature == nil {
298-
return false, nil, nil, &ErrWontSign{parentSigned}
299-
}
300-
verification := ParseCommitWithSignature(ctx, commit)
301-
if !verification.Verified {
302-
return false, nil, nil, &ErrWontSign{parentSigned}
297+
if !isEmpty {
298+
commit, err := gitRepo.GetCommit(parentCommit)
299+
if err != nil {
300+
return false, nil, nil, err
301+
}
302+
if commit.Signature == nil {
303+
return false, nil, nil, &ErrWontSign{parentSigned}
304+
}
305+
verification := ParseCommitWithSignature(ctx, commit)
306+
if !verification.Verified {
307+
return false, nil, nil, &ErrWontSign{parentSigned}
308+
}
303309
}
304310
}
305311
}

services/lfs/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func DownloadHandler(ctx *context.Context) {
114114
}
115115
}
116116

117-
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte))
117+
ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size))
118118
ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range")
119119
}
120120
}

services/migrations/github.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
354354

355355
// Prevent open redirect
356356
if !hasBaseURL(redirectURL, g.baseURL) &&
357-
!hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") {
357+
!hasBaseURL(redirectURL, "https://objects.githubusercontent.com/") &&
358+
!hasBaseURL(redirectURL, "https://release-assets.githubusercontent.com/") {
358359
WarnAndNotice("Unexpected AssetURL for assetID[%d] in %s: %s", asset.GetID(), g, redirectURL)
359360

360361
return io.NopCloser(strings.NewReader(redirectURL)), nil

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ parts:
4444
source: .
4545
stage-packages: [ git, sqlite3, openssh-client ]
4646
build-packages: [ git, libpam0g-dev, libsqlite3-dev, build-essential]
47-
build-snaps: [ go/1.24/stable, node/22/stable ]
47+
build-snaps: [ go/1.25/stable, node/22/stable ]
4848
build-environment:
4949
- LDFLAGS: ""
5050
override-pull: |

0 commit comments

Comments
 (0)