Skip to content

Commit 11e6c82

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-13939-make-2fa-optional
2 parents cb6b4c2 + 5a73153 commit 11e6c82

File tree

377 files changed

+11461
-6139
lines changed

Some content is hidden

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

377 files changed

+11461
-6139
lines changed

.drone.yml

+6-10
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

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/templates/**/*.tmpl linguist-language=Handlebars
55
/.eslintrc linguist-language=YAML
66
/.stylelintrc linguist-language=YAML
7+
/web_src/fomantic/build/** linguist-generated

CHANGELOG.md

+84-42
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,42 @@ 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
7+
## [1.15.2](https://github.com/go-gitea/gitea/releases/tag/v1.15.2) - 2021-09-03
88

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)
199
* 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 prepareWikiFileName 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)
10+
* Add unique constraint back into issue_index (#16938)
11+
* Close storage objects before cleaning (#16934) (#16942)
3712

38-
## [1.15.0-rc2](https://github.com/go-gitea/gitea/releases/tag/v1.15.0-rc2) - 2021-07-22
13+
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02
3914

4015
* 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 prepareWikiFileName 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
16+
* Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
17+
* Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
18+
* Ignore review comment when ref commit is missed (#16905) (#16919)
19+
* Fix wrong attachment removal (#16915) (#16917)
20+
* Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
21+
* Correctly return the number of Repositories for Organizations (#16807) (#16911)
22+
* Test if LFS object is accessible (#16865) (#16904)
23+
* Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
24+
* Fix dump and restore respository (#16698) (#16898)
25+
* Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
26+
* Fix wiki raw commit diff/patch view (#16891) (#16892)
27+
* Ensure wiki repos are all closed (#16886) (#16888)
28+
* List limited and private orgs if authenticated on API (#16866) (#16879)
29+
* Simplify split diff view generation and remove JS dependency (#16775) (#16863)
30+
* Ensure that the default visibility is set on the user create page (#16845) (#16862)
31+
* In Render tolerate not being passed a context (#16842) (#16858)
32+
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
33+
* Report the correct number of pushes on the feeds (#16811) (#16822)
34+
* Add primary_key to issue_index (#16813) (#16820)
35+
* Prevent NPE on empty commit (#16812) (#16819)
36+
* Fix branch pagination error (#16805) (#16816)
37+
* Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
38+
* Remove spurious / from issues.opened_by (#16793)
39+
* Ensure that template compilation panics are sent to the logs (#16788) (#16792)
40+
* Update caddyserver/certmagic (#16789) (#16790)
41+
42+
## [1.15.0](https://github.com/go-gitea/gitea/releases/tag/v1.15.0) - 2021-08-21
5243

5344
* BREAKING
5445
* Make app.ini permissions more restrictive (#16266)
@@ -63,9 +54,15 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
6354
* Move (custom) assets into subpath `/assets` (#15219)
6455
* Use level config in log section when sub log section not set level (#15176)
6556
* Links in markdown should be absolute to the repository not the server (#15088)
57+
* Upgrade to the latest version of golang-jwt (#16590) (#16606)
58+
* Set minimum supported version of go to 1.16 (#16710)
6659
* SECURITY
6760
* Encrypt LDAP bind password in db with SECRET_KEY (#15547)
6861
* Remove random password in Dockerfiles (#15362)
62+
* Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606)
63+
* Correctly create of git-daemon-export-ok files (#16508) (#16514)
64+
* Don't show private user's repo in explore view (#16550) (#16554)
65+
* Update node tar dependency to 6.1.6 (#16622) (#16623)
6966
* FEATURES
7067
* Update Go-Git to take advantage of LargeObjectThreshold (#16316)
7168
* Support custom mime type mapping for text files (#16304)
@@ -86,7 +83,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
8683
* Add LFS Migration and Mirror (#14726)
8784
* Improve notifications for WIP draft PR's (#14663)
8885
* Disable Stars config option (#14653)
89-
* Add option to provide signature for a token to verify key ownership (#14054)
86+
* GPG Key Ownership verification with Signed Token (#14054)
9087
* OAuth2 auto-register (#5123)
9188
* API
9289
* Return updated repository when changing repository using API (#16420)
@@ -106,6 +103,8 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
106103
* Add Active and ProhibitLogin to API (#15689)
107104
* Add Location, Website and Description to API (#15675)
108105
* Expose resolver via API (#15167)
106+
* Swagger AccessToken fixes (#16574) (#16597)
107+
* Set AllowedHeaders on API CORS handler (#16524) (#16618)
109108
* ENHANCEMENTS
110109
* Support HTTP/2 in Let's Encrypt (#16371)
111110
* Introduce NotifySubjectType (#16320)
@@ -231,6 +230,41 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
231230
* Add NeedPostProcess for Parser interface to improve performance of csv parser and some external parser (#15153)
232231
* Add code block highlight to orgmode back (#14222)
233232
* Remove User.GetOrganizations() (#14032)
233+
* Restore Accessibility for Dropdown (#16576) (#16617)
234+
* Pass down SignedUserName down to AccessLogger context (#16605) (#16616)
235+
* Fix table alignment in markdown (#16596) (#16602)
236+
* Fix 500 on first wiki page (#16586) (#16598)
237+
* Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570)
238+
* Upgrade levelqueue to v0.4.0 (#16560) (#16561)
239+
* Handle too long PR titles correctly (#16517) (#16549)
240+
* Fix data race in bleve indexer (#16474) (#16509)
241+
* Restore CORS on git smart http protocol (#16496) (#16506)
242+
* Fix race in log (#16490) (#16505)
243+
* Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498)
244+
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
245+
* Update notification table with only latest data (#16445) (#16469)
246+
* Fix crash following ldap authentication update (#16447) (#16448)
247+
* Fix direct creation of external users on admin page (partial #16612) (#16613)
248+
* Prevent 500 on draft releases without tag (#16634) (#16636)
249+
* Restore creation of git-daemon-export-ok files (#16508) (#16514)
250+
* Fix data race in bleve indexer (#16474) (#16509)
251+
* Restore CORS on git smart http protocol (#16496) (#16506)
252+
* Fix race in log (#16490) (#16505)
253+
* Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498)
254+
* Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480)
255+
* Update notification table with only latest data (#16445) (#16469)
256+
* Fix crash following ldap authentication update (#16447) (#16448)
257+
* Restore compatibility with SQLServer 2008 R2 in migrations (#16638)
258+
* Fix direct creation of external users on admin page (#16613)
259+
* Fix go-git implementation of GetNote when passed a non-existent commit (#16658) (#16659)
260+
* Fix NPE in fuzzer (#16680) (#16682)
261+
* Set issue_index when finishing migration (#16685) (#16687)
262+
* Skip patch download when no patch file exists (#16356) (#16681)
263+
* Ensure empty lines are copiable and final new line too (#16678) (#16692)
264+
* Fix wrong user in OpenID response (#16736) (#16741)
265+
* Do not use thin scrollbars on Firefox (#16738) (#16745)
266+
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16739)
267+
* Keep attachments on tasklist update (#16750) (#16757)
234268
* TESTING
235269
* Bump `postgres` and `mysql` versions (#15710)
236270
* Add tests for clone from wiki (#15513)
@@ -241,7 +275,6 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
241275
* Fix mirror_lfs source string in en-US locale (#15369)
242276
* BUILD
243277
* Upgrade xorm to v1.1.1 (#16339)
244-
* Alpine 3.14 released (#16170)
245278
* Disable legal comments in esbuild (#15929)
246279
* Switch to Node 16 to build fronted (#15804)
247280
* Use esbuild to minify CSS (#15756)
@@ -260,6 +293,15 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
260293
* Remove utf8 option from installation page (#16126)
261294
* Use Wants= over Requires= in systemd file (#15897)
262295

296+
## [1.14.7](https://github.com/go-gitea/gitea/releases/tag/v1.14.7) - 2021-09-02
297+
298+
* BUGFIXES
299+
* Add missing gitRepo close at GetDiffRangeWithWhitespaceBehavior (Partial #16894) (#16896)
300+
* Fix wiki raw commit diff/patch view (#16891) (#16893)
301+
* Ensure wiki repos are all closed (#16886) (#16889)
302+
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16849)
303+
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16740)
304+
263305
## [1.14.6](https://github.com/go-gitea/gitea/releases/tag/v1.14.6) - 2021-08-04
264306

265307
* SECURITY

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,9 @@ 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+
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out
389+
grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out
390+
GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1)
389391

390392
.PHONY: unit-test-coverage
391393
unit-test-coverage:
@@ -701,6 +703,7 @@ fomantic:
701703
cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/
702704
cp -f web_src/js/vendor/dropdown.js $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/definitions/modules
703705
cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build
706+
rm -f $(FOMANTIC_WORK_DIR)/build/*.min.*
704707

705708
.PHONY: webpack
706709
webpack: $(WEBPACK_DEST)

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">
@@ -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.

README_ZH.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
1616
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
1717
</a>
18-
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
18+
<a href="https://goreportcard.com/report/code.gitea.io/gitea" title="Go Report Card">
1919
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="GoDoc">

build.go

+2-1
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

+1
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

+1
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

+1
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

+1
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

+2-1
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

+1
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

+1
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

+5
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

+2-1
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

0 commit comments

Comments
 (0)