Skip to content

Commit 7cb8e2f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into issue-updates
2 parents 43ad9f5 + 7396172 commit 7cb8e2f

File tree

28 files changed

+729
-541
lines changed

28 files changed

+729
-541
lines changed

.eslintrc.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ rules:
537537
no-underscore-dangle: [0]
538538
no-unexpected-multiline: [2]
539539
no-unmodified-loop-condition: [2]
540-
no-unneeded-ternary: [0]
540+
no-unneeded-ternary: [2]
541541
no-unreachable-loop: [2]
542542
no-unreachable: [2]
543543
no-unsafe-finally: [2]
@@ -716,12 +716,14 @@ rules:
716716
unicorn/import-style: [0]
717717
unicorn/new-for-builtins: [2]
718718
unicorn/no-abusive-eslint-disable: [0]
719+
unicorn/no-anonymous-default-export: [0]
719720
unicorn/no-array-callback-reference: [0]
720721
unicorn/no-array-for-each: [2]
721722
unicorn/no-array-method-this-argument: [2]
722723
unicorn/no-array-push-push: [2]
723724
unicorn/no-array-reduce: [2]
724725
unicorn/no-await-expression-member: [0]
726+
unicorn/no-await-in-promise-methods: [2]
725727
unicorn/no-console-spaces: [0]
726728
unicorn/no-document-cookie: [2]
727729
unicorn/no-empty-file: [2]
@@ -738,6 +740,7 @@ rules:
738740
unicorn/no-null: [0]
739741
unicorn/no-object-as-default-parameter: [0]
740742
unicorn/no-process-exit: [0]
743+
unicorn/no-single-promise-in-promise-methods: [2]
741744
unicorn/no-static-only-class: [2]
742745
unicorn/no-thenable: [2]
743746
unicorn/no-this-assignment: [2]

custom/conf/app.example.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,6 +2315,8 @@ LEVEL = Info
23152315
;SHOW_FOOTER_VERSION = true
23162316
;; Show template execution time in the footer
23172317
;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
2318+
;; Show the "powered by" text in the footer
2319+
;SHOW_FOOTER_POWERED_BY = true
23182320
;; Generate sitemap. Defaults to `true`.
23192321
;ENABLE_SITEMAP = true
23202322
;; Enable/Disable RSS/Atom feed

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,5 +1429,6 @@ Like `uses: https://gitea.com/actions/checkout@v4` or `uses: http://your-git-ser
14291429

14301430
- `SHOW_FOOTER_VERSION`: **true**: Show Gitea and Go version information in the footer.
14311431
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
1432+
- `SHOW_FOOTER_POWERED_BY`: **true**: Show the "powered by" text in the footer.
14321433
- `ENABLE_SITEMAP`: **true**: Generate sitemap.
14331434
- `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed.

docs/content/administration/config-cheat-sheet.zh-cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,5 +1353,6 @@ PROXY_HOSTS = *.github.com
13531353

13541354
- `SHOW_FOOTER_VERSION`: **true**: 在页面底部显示Gitea的版本。
13551355
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: 在页脚显示模板执行的时间。
1356+
- `SHOW_FOOTER_POWERED_BY`: **true**: 在页脚显示“由...提供动力”的文本。
13561357
- `ENABLE_SITEMAP`: **true**: 生成sitemap.
13571358
- `ENABLE_FEED`: **true**: 是否启用RSS/Atom

docs/content/installation/with-docker.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ services:
304304
- GITEA__mailer__ENABLED=true
305305
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
306306
- GITEA__mailer__PROTOCOL=smtps
307-
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
307+
- GITEA__mailer__SMTP_ADDR=${GITEA__mailer__SMTP_ADDR:?GITEA__mailer__SMTP_ADDR not set}
308+
- GITEA__mailer__SMTP_PORT=${GITEA__mailer__SMTP_PORT:?GITEA__mailer__SMTP_PORT not set}
308309
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
309310
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
310311
```

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,11 @@ require (
107107
github.com/yuin/goldmark v1.7.0
108108
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc
109109
github.com/yuin/goldmark-meta v1.1.0
110-
golang.org/x/crypto v0.21.0
110+
golang.org/x/crypto v0.22.0
111111
golang.org/x/image v0.15.0
112-
golang.org/x/net v0.22.0
112+
golang.org/x/net v0.24.0
113113
golang.org/x/oauth2 v0.18.0
114-
golang.org/x/sys v0.18.0
114+
golang.org/x/sys v0.19.0
115115
golang.org/x/text v0.14.0
116116
golang.org/x/tools v0.19.0
117117
google.golang.org/grpc v1.62.1

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz
850850
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
851851
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
852852
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
853-
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
854-
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
853+
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
854+
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
855855
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw=
856856
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
857857
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
@@ -885,8 +885,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
885885
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
886886
golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
887887
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
888-
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
889-
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
888+
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
889+
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
890890
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
891891
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
892892
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -936,8 +936,8 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
936936
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
937937
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
938938
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
939-
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
940-
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
939+
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
940+
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
941941
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
942942
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
943943
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
@@ -947,8 +947,8 @@ golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
947947
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
948948
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
949949
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
950-
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
951-
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
950+
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
951+
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
952952
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
953953
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
954954
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=

modules/lfs/filesystem_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (c *FilesystemClient) Download(ctx context.Context, objects []Pointer, call
4444
if err != nil {
4545
return err
4646
}
47-
47+
defer f.Close()
4848
if err := callback(p, f, nil); err != nil {
4949
return err
5050
}
@@ -75,7 +75,7 @@ func (c *FilesystemClient) Upload(ctx context.Context, objects []Pointer, callba
7575
if err != nil {
7676
return err
7777
}
78-
78+
defer f.Close()
7979
_, err = io.Copy(f, content)
8080

8181
return err

modules/markup/sanitizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func createDefaultPolicy() *bluemonday.Policy {
6565
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^lines-num$`)).OnElements("td")
6666
policy.AllowAttrs("data-line-number").OnElements("span")
6767
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^lines-code chroma$`)).OnElements("td")
68-
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^code-inner$`)).OnElements("code")
68+
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^code-inner$`)).OnElements("div")
6969

7070
// For code preview (unicode escape)
7171
policy.AllowAttrs("class").Matching(regexp.MustCompile(`^file-view( unicode-escaped)?$`)).OnElements("table")

modules/setting/other.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ import "code.gitea.io/gitea/modules/log"
88
type OtherConfig struct {
99
ShowFooterVersion bool
1010
ShowFooterTemplateLoadTime bool
11+
ShowFooterPoweredBy bool
1112
EnableFeed bool
1213
EnableSitemap bool
1314
}
1415

1516
var Other = OtherConfig{
1617
ShowFooterVersion: true,
1718
ShowFooterTemplateLoadTime: true,
19+
ShowFooterPoweredBy: true,
1820
EnableSitemap: true,
1921
EnableFeed: true,
2022
}

0 commit comments

Comments
 (0)