Skip to content

Commit de07c25

Browse files
authored
Merge branch 'main' into oidc-claims
2 parents 11791e5 + d985d4b commit de07c25

File tree

331 files changed

+8099
-4262
lines changed

Some content is hidden

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

331 files changed

+8099
-4262
lines changed

.drone.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,16 +214,6 @@ steps:
214214
environment:
215215
GOPROXY: off
216216
TAGS: bindata sqlite sqlite_unlock_notify
217-
GITHUB_READ_TOKEN:
218-
from_secret: github_read_token
219-
220-
- name: unit-test-race
221-
image: golang:1.17
222-
commands:
223-
- make test-backend
224-
environment:
225-
GOPROXY: off
226-
TAGS: sqlite sqlite_unlock_notify
227217
RACE_ENABLED: true
228218
GITHUB_READ_TOKEN:
229219
from_secret: github_read_token
@@ -236,6 +226,7 @@ steps:
236226
environment:
237227
GOPROXY: off
238228
TAGS: bindata gogit sqlite sqlite_unlock_notify
229+
RACE_ENABLED: true
239230
GITHUB_READ_TOKEN:
240231
from_secret: github_read_token
241232

@@ -246,6 +237,7 @@ steps:
246237
environment:
247238
GOPROXY: off
248239
TAGS: bindata
240+
RACE_ENABLED: true
249241
TEST_LDAP: 1
250242
USE_REPO_TEST_DIR: 1
251243
TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200"
@@ -259,6 +251,7 @@ steps:
259251
environment:
260252
GOPROXY: off
261253
TAGS: bindata
254+
RACE_ENABLED: true
262255
TEST_LDAP: 1
263256
USE_REPO_TEST_DIR: 1
264257
depends_on:
@@ -271,6 +264,7 @@ steps:
271264
environment:
272265
GOPROXY: off
273266
TAGS: bindata
267+
RACE_ENABLED: true
274268
TEST_LDAP: 1
275269
USE_REPO_TEST_DIR: 1
276270
depends_on:
@@ -366,6 +360,7 @@ steps:
366360
environment:
367361
GOPROXY: off
368362
TAGS: bindata gogit sqlite sqlite_unlock_notify
363+
RACE_ENABLED: true
369364
TEST_TAGS: gogit sqlite sqlite_unlock_notify
370365
USE_REPO_TEST_DIR: 1
371366
depends_on:
@@ -378,6 +373,7 @@ steps:
378373
environment:
379374
GOPROXY: off
380375
TAGS: bindata gogit
376+
RACE_ENABLED: true
381377
TEST_TAGS: gogit
382378
TEST_LDAP: 1
383379
USE_REPO_TEST_DIR: 1

CHANGELOG.md

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,7 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7-
## [1.15.0-rc3](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc3) - 2021-08-06
8-
9-
* BREAKING
10-
* Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606)
11-
* SECURITY
12-
* Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606)
13-
* Correctly create of git-daemon-export-ok files (#16508) (#16514)
14-
* Don't show private user's repo in explore view (#16550) (#16554)
15-
* Update node tar dependency to 6.1.6 (#16622) (#16623)
16-
* API
17-
* Swagger AccessToken fixes (#16574) (#16597)
18-
* Set AllowedHeaders on API CORS handler (#16524) (#16618)
19-
* BUGFIXES
20-
* Restore Accessibility for Dropdown (#16576) (#16617)
21-
* Pass down SignedUserName down to AccessLogger context (#16605) (#16616)
22-
* Fix table alignment in markdown (#16596) (#16602)
23-
* Fix 500 on first wiki page (#16586) (#16598)
24-
* Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570)
25-
* Upgrade levelqueue to v0.4.0 (#16560) (#16561)
26-
* Handle too long PR titles correctly (#16517) (#16549)
27-
* Fix data race in bleve indexer (#16474) (#16509)
28-
* Restore CORS on git smart http protocol (#16496) (#16506)
29-
* Fix race in log (#16490) (#16505)
30-
* Fix prepareUncycloFileName to respect existing unescaped files (#16487) (#16498)
31-
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
32-
* Update notification table with only latest data (#16445) (#16469)
33-
* Revert to use alpine 3.13 (#16451) (#16452)
34-
* Fix crash following ldap authentication update (#16447) (#16448)
35-
* Fix direct creation of external users on admin page (partial #16612) (#16613)
36-
* Prevent 500 on draft releases without tag (#16634) (#16636)
37-
38-
## [1.15.0-rc2](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc2) - 2021-07-22
39-
40-
* BUGFIXES
41-
* Restore creation of git-daemon-export-ok files (#16508) (#16514)
42-
* Fix data race in bleve indexer (#16474) (#16509)
43-
* Restore CORS on git smart http protocol (#16496) (#16506)
44-
* Fix race in log (#16490) (#16505)
45-
* Fix prepareUncycloFileName to respect existing unescaped files (#16487) (#16498)
46-
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
47-
* Update notification table with only latest data (#16445) (#16469)
48-
* Revert to use alpine 3.13 to fix multiple seccomp related issues with Docker <20 (#16451) (#16452)
49-
* Fix crash following ldap authentication update (#16447) (#16448)
50-
51-
## [1.15.0-rc1](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc1) - 2021-07-15
7+
## [1.15.0](https://github.com/go-gitea/gitea/releases/tag/v1.15.0) - 2021-08-21
528

539
* BREAKING
5410
* Make app.ini permissions more restrictive (#16266)
@@ -63,9 +19,15 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
6319
* Move (custom) assets into subpath `/assets` (#15219)
6420
* Use level config in log section when sub log section not set level (#15176)
6521
* Links in markdown should be absolute to the repository not the server (#15088)
22+
* Upgrade to the latest version of golang-jwt (#16590) (#16606)
23+
* Set minimum supported version of go to 1.16 (#16710)
6624
* SECURITY
6725
* Encrypt LDAP bind password in db with SECRET_KEY (#15547)
6826
* Remove random password in Dockerfiles (#15362)
27+
* Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606)
28+
* Correctly create of git-daemon-export-ok files (#16508) (#16514)
29+
* Don't show private user's repo in explore view (#16550) (#16554)
30+
* Update node tar dependency to 6.1.6 (#16622) (#16623)
6931
* FEATURES
7032
* Update Go-Git to take advantage of LargeObjectThreshold (#16316)
7133
* Support custom mime type mapping for text files (#16304)
@@ -86,7 +48,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
8648
* Add LFS Migration and Mirror (#14726)
8749
* Improve notifications for WIP draft PR's (#14663)
8850
* Disable Stars config option (#14653)
89-
* Add option to provide signature for a token to verify key ownership (#14054)
51+
* GPG Key Ownership verification with Signed Token (#14054)
9052
* OAuth2 auto-register (#5123)
9153
* API
9254
* Return updated repository when changing repository using API (#16420)
@@ -106,6 +68,8 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
10668
* Add Active and ProhibitLogin to API (#15689)
10769
* Add Location, Website and Description to API (#15675)
10870
* Expose resolver via API (#15167)
71+
* Swagger AccessToken fixes (#16574) (#16597)
72+
* Set AllowedHeaders on API CORS handler (#16524) (#16618)
10973
* ENHANCEMENTS
11074
* Support HTTP/2 in Let's Encrypt (#16371)
11175
* Introduce NotifySubjectType (#16320)
@@ -231,6 +195,41 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
231195
* Add NeedPostProcess for Parser interface to improve performance of csv parser and some external parser (#15153)
232196
* Add code block highlight to orgmode back (#14222)
233197
* Remove User.GetOrganizations() (#14032)
198+
* Restore Accessibility for Dropdown (#16576) (#16617)
199+
* Pass down SignedUserName down to AccessLogger context (#16605) (#16616)
200+
* Fix table alignment in markdown (#16596) (#16602)
201+
* Fix 500 on first wiki page (#16586) (#16598)
202+
* Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570)
203+
* Upgrade levelqueue to v0.4.0 (#16560) (#16561)
204+
* Handle too long PR titles correctly (#16517) (#16549)
205+
* Fix data race in bleve indexer (#16474) (#16509)
206+
* Restore CORS on git smart http protocol (#16496) (#16506)
207+
* Fix race in log (#16490) (#16505)
208+
* Fix prepareUncycloFileName to respect existing unescaped files (#16487) (#16498)
209+
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
210+
* Update notification table with only latest data (#16445) (#16469)
211+
* Fix crash following ldap authentication update (#16447) (#16448)
212+
* Fix direct creation of external users on admin page (partial #16612) (#16613)
213+
* Prevent 500 on draft releases without tag (#16634) (#16636)
214+
* Restore creation of git-daemon-export-ok files (#16508) (#16514)
215+
* Fix data race in bleve indexer (#16474) (#16509)
216+
* Restore CORS on git smart http protocol (#16496) (#16506)
217+
* Fix race in log (#16490) (#16505)
218+
* Fix prepareUncycloFileName to respect existing unescaped files (#16487) (#16498)
219+
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
220+
* Update notification table with only latest data (#16445) (#16469)
221+
* Fix crash following ldap authentication update (#16447) (#16448)
222+
* Restore compatibility with SQLServer 2008 R2 in migrations (#16638)
223+
* Fix direct creation of external users on admin page (#16613)
224+
* Fix go-git implementation of GetNote when passed a non-existent commit (#16658) (#16659)
225+
* Fix NPE in fuzzer (#16680) (#16682)
226+
* Set issue_index when finishing migration (#16685) (#16687)
227+
* Skip patch download when no patch file exists (#16356) (#16681)
228+
* Ensure empty lines are copiable and final new line too (#16678) (#16692)
229+
* Fix wrong user in OpenID response (#16736) (#16741)
230+
* Do not use thin scrollbars on Firefox (#16738) (#16745)
231+
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16739)
232+
* Keep attachments on tasklist update (#16750) (#16757)
234233
* TESTING
235234
* Bump `postgres` and `mysql` versions (#15710)
236235
* Add tests for clone from wiki (#15513)
@@ -241,7 +240,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
241240
* Fix mirror_lfs source string in en-US locale (#15369)
242241
* BUILD
243242
* Upgrade xorm to v1.1.1 (#16339)
244-
* Alpine 3.14 released (#16170)
245243
* Disable legal comments in esbuild (#15929)
246244
* Switch to Node 16 to build fronted (#15804)
247245
* Use esbuild to minify CSS (#15756)

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ test\#%:
385385

386386
.PHONY: coverage
387387
coverage:
388-
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all
388+
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out coverage.out > coverage.all
389389

390390
.PHONY: unit-test-coverage
391391
unit-test-coverage:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ or if sqlite support is required:
7373

7474
The `build` target is split into two sub-targets:
7575

76-
- `make backend` which requires [Go 1.13](https://golang.org/dl/) or greater.
76+
- `make backend` which requires [Go 1.16](https://golang.org/dl/) or greater.
7777
- `make frontend` which requires [Node.js 12.17](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies.
7878

7979
When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity.

build.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5-
//+build vendor
5+
//go:build vendor
6+
// +build vendor
67

78
package main
89

build/generate-bindata.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build ignore
56
// +build ignore
67

78
package main

build/generate-emoji.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Use of this source code is governed by a MIT-style
44
// license that can be found in the LICENSE file.
55

6+
//go:build ignore
67
// +build ignore
78

89
package main

build/generate-gitignores.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build ignore
12
// +build ignore
23

34
package main

build/generate-licenses.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build ignore
12
// +build ignore
23

34
package main

build/gocovmerge.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// gocovmerge takes the results from multiple `go test -coverprofile` runs and
77
// merges them into one profile
88

9+
//go:build ignore
910
// +build ignore
1011

1112
package main
@@ -108,7 +109,7 @@ func main() {
108109
for _, file := range flag.Args() {
109110
profiles, err := cover.ParseProfiles(file)
110111
if err != nil {
111-
log.Fatalf("failed to parse profiles: %v", err)
112+
log.Fatalf("failed to parse profile '%s': %v", file, err)
112113
}
113114
for _, p := range profiles {
114115
merged = addProfile(merged, p)

cmd/embedded.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build bindata
56
// +build bindata
67

78
package cmd

cmd/embedded_stub.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Use of this source code is governed by a MIT-style
33
// license that can be found in the LICENSE file.
44

5+
//go:build !bindata
56
// +build !bindata
67

78
package cmd

cmd/web.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ func runWeb(ctx *cli.Context) error {
8686
_ = log.DelLogger("console")
8787
log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "fatal", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout))
8888
}
89+
defer func() {
90+
if panicked := recover(); panicked != nil {
91+
log.Fatal("PANIC: %v\n%s", panicked, string(log.Stack(2)))
92+
}
93+
}()
8994

9095
managerCtx, cancel := context.WithCancel(context.Background())
9196
graceful.InitManager(managerCtx)

custom/conf/app.example.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ INTERNAL_TOKEN=
392392
;; Enables OAuth2 provider
393393
ENABLE = true
394394
;;
395-
;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512
395+
;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, EdDSA
396396
;JWT_SIGNING_ALGORITHM = RS256
397397
;;
398398
;; Private key file path used to sign OAuth2 tokens. The path is relative to APP_DATA_PATH.
@@ -907,6 +907,7 @@ PATH =
907907
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
908908
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
909909
;ALLOWED_TYPES =
910+
;DEFAULT_PAGING_NUM = 10
910911

911912
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
912913
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.14.6
21+
version: 1.15.0
2222
minGoVersion: 1.16
2323
goVersion: 1.17
2424
minNodeVersion: 12.17

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
115115
### Repository - Release (`repository.release`)
116116

117117
- `ALLOWED_TYPES`: **\<empty\>**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
118+
- `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface
118119

119120
### Repository - Signing (`repository.signing`)
120121

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ menu:
3636
- `MAX_CREATION_LIMIT`: 全局最大每个用户创建的git工程数目, `-1` 表示没限制。
3737
- `PULL_REQUEST_QUEUE_LENGTH`: 小心:合并请求测试队列的长度,尽量放大。
3838

39+
### Repository - Release (`repository.release`)
40+
41+
- `ALLOWED_TYPES`: **\<empty\>**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
42+
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
43+
3944
## UI (`ui`)
4045

4146
- `EXPLORE_PAGING_NUM`: 探索页面每页显示的仓库数量。

docs/content/doc/developers/hacking-on-gitea.en-us.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,19 @@ Visual Studio Code. Look at
309309
[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md)
310310
for more information.
311311

312+
## GoLand
313+
314+
Clicking the `Run Application` arrow on the function `func main()` in `/main.go`
315+
can quickly start a debuggable gitea instance.
316+
317+
The `Output Directory` in `Run/Debug Configuration` MUST be set to the
318+
gitea project directory (which contains `main.go` and `go.mod`),
319+
otherwise, the started instance's working directory is a GoLand's temporary directory
320+
and prevents gitea from loading dynamic resources (eg: templates) in a development environment.
321+
322+
To run unit tests with SQLite in GoLand, set `-tags sqlite,sqlite_unlock_notify`
323+
in `Go tool arguments` of `Run/Debug Configuration`.
324+
312325
## Submitting PRs
313326

314327
Once you're happy with your changes, push them up and open a pull request. It

0 commit comments

Comments
 (0)