Skip to content

Commit 1520b9a

Browse files
authored
Merge branch 'main' into lunny/lock_package_upload
2 parents 6830964 + 8e2dd5d commit 1520b9a

File tree

144 files changed

+1710
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1710
-728
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "Gitea DevContainer",
3-
"image": "mcr.microsoft.com/devcontainers/go:1.22-bullseye",
3+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
44
"features": {
55
// installs nodejs into container
66
"ghcr.io/devcontainers/features/node:1": {
77
"version": "20"
88
},
9-
"ghcr.io/devcontainers/features/git-lfs:1.1.0": {},
9+
"ghcr.io/devcontainers/features/git-lfs:1.2.2": {},
1010
"ghcr.io/devcontainers-contrib/features/poetry:2": {},
1111
"ghcr.io/devcontainers/features/python:1": {
1212
"version": "3.12"

.github/workflows/pull-db-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ jobs:
201201
runs-on: ubuntu-latest
202202
services:
203203
mssql:
204-
image: mcr.microsoft.com/mssql/server:2017-latest
204+
# some images before 2024-04 can't run on new kernels
205+
image: mcr.microsoft.com/mssql/server:2019-latest
205206
env:
206207
ACCEPT_EULA: Y
207208
MSSQL_PID: Standard

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.22-alpine3.20 AS build-env
2+
FROM docker.io/library/golang:1.23-alpine3.20 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.22-alpine3.20 AS build-env
2+
FROM docker.io/library/golang:1.23-alpine3.20 AS build-env
33

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

Makefile

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

26-
XGO_VERSION := go-1.22.x
26+
XGO_VERSION := go-1.23.x
2727

2828
AIR_PACKAGE ?= github.com/air-verse/air@v1
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
30-
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.6.0
31-
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
30+
GOFUMPT_PACKAGE ?= mvdan.cc/gofumpt@v0.7.0
31+
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3
3232
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/golangci/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]

assets/go-licenses.json

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

cmd/admin_user_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func runCreateUser(c *cli.Context) error {
158158
IsRestricted: restricted,
159159
}
160160

161-
if err := user_model.CreateUser(ctx, u, overwriteDefault); err != nil {
161+
if err := user_model.CreateUser(ctx, u, &user_model.Meta{}, overwriteDefault); err != nil {
162162
return fmt.Errorf("CreateUser: %w", err)
163163
}
164164

cmd/hook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,14 +542,14 @@ Gitea or set your environment appropriately.`, "")
542542

543543
index := bytes.IndexByte(rs.Data, byte(0))
544544
if index >= len(rs.Data) {
545-
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
545+
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
546546
}
547547

548548
if index < 0 {
549549
if len(rs.Data) == 10 && rs.Data[9] == '\n' {
550550
index = 9
551551
} else {
552-
return fail(ctx, "Protocol: format error", "pkt-line: format error "+fmt.Sprint(rs.Data))
552+
return fail(ctx, "Protocol: format error", "pkt-line: format error %s", rs.Data)
553553
}
554554
}
555555

custom/conf/app.example.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ INTERNAL_TOKEN =
507507
;; stemming from cached/logged plain-text API tokens.
508508
;; In future releases, this will become the default behavior
509509
;DISABLE_QUERY_AUTH_TOKEN = false
510+
;;
511+
;; On user registration, record the IP address and user agent of the user to help identify potential abuse.
512+
;; RECORD_USER_SIGNUP_METADATA = false
510513

511514
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
512515
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -523,7 +526,8 @@ INTERNAL_TOKEN =
523526
;; HMAC to encode urls with, it **is required** if camo is enabled.
524527
;HMAC_KEY =
525528
;; Set to true to use camo for https too lese only non https urls are proxyed
526-
;ALLWAYS = false
529+
;; ALLWAYS is deprecated and will be removed in the future
530+
;ALWAYS = false
527531

528532
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
529533
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2692,7 +2696,7 @@ LEVEL = Info
26922696
;; It's always recommended to use compression when using local disk as log storage if CPU or memory is not a bottleneck.
26932697
;; And for object storage services like S3, which is billed for requests, it would cause extra 2 times of get requests for each log view.
26942698
;; But it will save storage space and network bandwidth, so it's still recommended to use compression.
2695-
;LOG_COMPRESSION = none
2699+
;LOG_COMPRESSION = zstd
26962700
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
26972701
;ARTIFACT_RETENTION_DAYS = 90
26982702
;; Timeout to stop the task which have running status, but haven't been updated for a long time

go.mod

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
module code.gitea.io/gitea
22

3-
go 1.22
3+
go 1.23
4+
5+
// rfc5280 said: "The serial number is an integer assigned by the CA to each certificate."
6+
// But some CAs use negative serial number, just relax the check. related:
7+
// Default TLS cert uses negative serial number #895 https://github.com/microsoft/mssql-docker/issues/895
8+
godebug x509negativeserial=1
49

510
require (
611
code.gitea.io/actions-proto-go v0.4.0
@@ -9,11 +14,12 @@ require (
914
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
1015
connectrpc.com/connect v1.15.0
1116
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed
12-
gitea.com/go-chi/cache v0.2.0
17+
gitea.com/go-chi/cache v0.2.1
1318
gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
1419
gitea.com/go-chi/session v0.0.0-20240316035857-16768d98ec96
1520
gitea.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
1621
gitea.com/lunny/levelqueue v0.4.2-0.20230414023320-3c0159fe0fe4
22+
github.com/42wim/httpsig v1.2.2
1723
github.com/42wim/sshsig v0.0.0-20211121163825-841cf5bbc121
1824
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.12.0
1925
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.2
@@ -22,6 +28,9 @@ require (
2228
github.com/PuerkitoBio/goquery v1.9.2
2329
github.com/SaveTheRbtz/zstd-seekable-format-go/pkg v0.7.2
2430
github.com/alecthomas/chroma/v2 v2.14.0
31+
github.com/aws/aws-sdk-go v1.43.21
32+
github.com/aws/aws-sdk-go-v2/credentials v1.17.30
33+
github.com/aws/aws-sdk-go-v2/service/codecommit v1.25.1
2534
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
2635
github.com/blevesearch/bleve/v2 v2.4.2
2736
github.com/buildkite/terminal-to-html/v3 v3.12.1
@@ -45,7 +54,6 @@ require (
4554
github.com/go-chi/cors v1.2.1
4655
github.com/go-co-op/gocron v1.37.0
4756
github.com/go-enry/go-enry/v2 v2.8.8
48-
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
4957
github.com/go-git/go-billy/v5 v5.5.0
5058
github.com/go-git/go-git/v5 v5.12.0
5159
github.com/go-ldap/ldap/v3 v3.4.6
@@ -110,13 +118,13 @@ require (
110118
github.com/yuin/goldmark v1.7.2
111119
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
112120
github.com/yuin/goldmark-meta v1.1.0
113-
golang.org/x/crypto v0.24.0
121+
golang.org/x/crypto v0.26.0
114122
golang.org/x/image v0.18.0
115-
golang.org/x/net v0.26.0
123+
golang.org/x/net v0.28.0
116124
golang.org/x/oauth2 v0.21.0
117-
golang.org/x/sys v0.21.0
118-
golang.org/x/text v0.16.0
119-
golang.org/x/tools v0.22.0
125+
golang.org/x/sys v0.23.0
126+
golang.org/x/text v0.17.0
127+
golang.org/x/tools v0.24.0
120128
google.golang.org/grpc v1.62.1
121129
google.golang.org/protobuf v1.34.2
122130
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
@@ -146,6 +154,10 @@ require (
146154
github.com/andybalholm/cascadia v1.3.2 // indirect
147155
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
148156
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
157+
github.com/aws/aws-sdk-go-v2 v1.30.4 // indirect
158+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect
159+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect
160+
github.com/aws/smithy-go v1.20.4 // indirect
149161
github.com/aymerick/douceur v0.2.0 // indirect
150162
github.com/beorn7/perks v1.0.1 // indirect
151163
github.com/bits-and-blooms/bitset v1.13.0 // indirect
@@ -190,6 +202,7 @@ require (
190202
github.com/go-enry/go-oniguruma v1.2.1 // indirect
191203
github.com/go-faster/city v1.0.1 // indirect
192204
github.com/go-faster/errors v0.7.1 // indirect
205+
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e // indirect
193206
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
194207
github.com/go-openapi/analysis v0.23.0 // indirect
195208
github.com/go-openapi/errors v0.22.0 // indirect
@@ -248,18 +261,20 @@ require (
248261
github.com/modern-go/reflect2 v1.0.2 // indirect
249262
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
250263
github.com/mschoch/smat v0.2.0 // indirect
264+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
251265
github.com/nwaples/rardecode v1.1.3 // indirect
252266
github.com/oklog/ulid v1.3.1 // indirect
253267
github.com/olekukonko/tablewriter v0.0.5 // indirect
254268
github.com/onsi/ginkgo v1.16.5 // indirect
269+
github.com/onsi/gomega v1.33.1 // indirect
255270
github.com/paulmach/orb v0.11.1 // indirect
256-
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
271+
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
257272
github.com/pierrec/lz4/v4 v4.1.21 // indirect
258273
github.com/pjbgf/sha1cd v0.3.0 // indirect
259274
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
260-
github.com/prometheus/client_model v0.6.0 // indirect
261-
github.com/prometheus/common v0.50.0 // indirect
262-
github.com/prometheus/procfs v0.13.0 // indirect
275+
github.com/prometheus/client_model v0.6.1 // indirect
276+
github.com/prometheus/common v0.55.0 // indirect
277+
github.com/prometheus/procfs v0.15.1 // indirect
263278
github.com/rhysd/actionlint v1.7.1 // indirect
264279
github.com/rivo/uniseg v0.4.7 // indirect
265280
github.com/rogpeppe/go-internal v1.12.0 // indirect
@@ -299,8 +314,8 @@ require (
299314
go.uber.org/multierr v1.11.0 // indirect
300315
go.uber.org/zap v1.27.0 // indirect
301316
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect
302-
golang.org/x/mod v0.18.0 // indirect
303-
golang.org/x/sync v0.7.0 // indirect
317+
golang.org/x/mod v0.20.0 // indirect
318+
golang.org/x/sync v0.8.0 // indirect
304319
golang.org/x/time v0.5.0 // indirect
305320
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
306321
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect

0 commit comments

Comments
 (0)