Skip to content

Commit 8c7570a

Browse files
committed
Merge branch 'mobile-tabs' into mobile-org-new-menu
2 parents c014570 + d1e4c53 commit 8c7570a

File tree

502 files changed

+14678
-46918
lines changed

Some content is hidden

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

502 files changed

+14678
-46918
lines changed

.drone.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ steps:
2727

2828
- name: lint-backend
2929
pull: always
30-
image: golang:1.16
30+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
3131
commands:
3232
- make lint-backend
3333
environment:
@@ -37,7 +37,7 @@ steps:
3737

3838
- name: lint-backend-windows
3939
pull: always
40-
image: golang:1.16
40+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
4141
commands:
4242
- make golangci-lint vet
4343
environment:
@@ -49,7 +49,7 @@ steps:
4949

5050
- name: lint-backend-gogit
5151
pull: always
52-
image: golang:1.16
52+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
5353
commands:
5454
- make lint-backend
5555
environment:
@@ -223,10 +223,8 @@ steps:
223223
from_secret: github_read_token
224224

225225
- name: test-mysql
226-
image: golang:1.16
226+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
227227
commands:
228-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
229-
- apt-get install -y git-lfs
230228
- make test-mysql-migration integration-test-coverage
231229
environment:
232230
GOPROXY: off
@@ -238,10 +236,8 @@ steps:
238236
- build
239237

240238
- name: test-mysql8
241-
image: golang:1.16
239+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
242240
commands:
243-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
244-
- apt-get install -y git-lfs
245241
- timeout -s ABRT 40m make test-mysql8-migration test-mysql8
246242
environment:
247243
GOPROXY: off
@@ -252,10 +248,8 @@ steps:
252248
- build
253249

254250
- name: test-mssql
255-
image: golang:1.16
251+
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
256252
commands:
257-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
258-
- apt-get install -y git-lfs
259253
- make test-mssql-migration test-mssql
260254
environment:
261255
GOPROXY: off
@@ -349,10 +343,8 @@ steps:
349343
TAGS: bindata gogit sqlite sqlite_unlock_notify
350344

351345
- name: test-sqlite
352-
image: golang:1.16
346+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
353347
commands:
354-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
355-
- apt-get install -y git-lfs
356348
- timeout -s ABRT 40m make test-sqlite-migration test-sqlite
357349
environment:
358350
GOPROXY: off
@@ -363,10 +355,8 @@ steps:
363355
- build
364356

365357
- name: test-pgsql
366-
image: golang:1.16
358+
image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
367359
commands:
368-
- "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash"
369-
- apt-get install -y git-lfs
370360
- timeout -s ABRT 40m make test-pgsql-migration test-pgsql
371361
environment:
372362
GOPROXY: off

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ linters-settings:
2626
gocritic:
2727
disabled-checks:
2828
- ifElseChain
29-
- singleCaseSwitch # Every time this occured in the code, there was no other way.
29+
- singleCaseSwitch # Every time this occurred in the code, there was no other way.
3030

3131
issues:
3232
exclude-rules:

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +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.13.4](https://github.com/go-gitea/gitea/releases/tag/v1.13.4) - 2021-03-07
8+
9+
* SECURITY
10+
* Fix issue popups (#14898) (#14899)
11+
* BUGFIXES
12+
* Fix race in LFS ContentStore.Put(...) (#14895) (#14913)
13+
* Fix a couple of issues with a feeds (#14897) (#14903)
14+
* When transfering repository and database transaction failed, rollback the renames (#14864) (#14902)
15+
* Fix race in local storage (#14888) (#14901)
16+
* Fix 500 on pull view page if user is not loged in (#14885) (#14886)
17+
* DOCS
18+
* Fix how lfs data path is set (#14855) (#14884)
19+
20+
## [1.13.3](https://github.com/go-gitea/gitea/releases/tag/v1.13.3) - 2021-03-04
21+
22+
* BREAKING
23+
* Turn default hash password algorithm back to pbkdf2 from argon2 until we find a better one (#14673) (#14675)
24+
* BUGFIXES
25+
* Fix paging of file commit logs (#14831) (#14879)
26+
* Print useful error if SQLite is used in settings but not supported (#14476) (#14874)
27+
* Fix display since time round (#14226) (#14873)
28+
* When Deleting Repository only explicitly close PRs whose base is not this repository (#14823) (#14842)
29+
* Set HCaptchaSiteKey on Link Account pages (#14834) (#14839)
30+
* Fix a couple of CommentAsPatch issues. (#14804) (#14820)
31+
* Disable broken OAuth2 providers at startup (#14802) (#14811)
32+
* Repo Transfer permission checks (#14792) (#14794)
33+
* Fix double alert in oauth2 application edit view (#14764) (#14768)
34+
* Fix broken spans in diffs (#14678) (#14683)
35+
* Prevent race in PersistableChannelUniqueQueue.Has (#14651) (#14676)
36+
* HasPreviousCommit causes recursive load of commits unnecessarily (#14598) (#14649)
37+
* Do not assume all 40 char strings are SHA1s (#14624) (#14648)
38+
* Allow org labels to be set with issue templates (#14593) (#14647)
39+
* Accept multiple SSH keys in single LDAP SSHPublicKey attribute (#13989) (#14607)
40+
* Fix bug about ListOptions and stars/watchers pagnation (#14556) (#14573)
41+
* Fix GPG key deletion during account deletion (#14561) (#14569)
42+
743
## [1.13.2](https://github.com/go-gitea/gitea/releases/tag/v1.13.2) - 2021-01-31
844

945
* SECURITY

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ David Svantesson <davidsvantesson@gmail.com> (@davidsvantesson)
3939
a1012112796 <1012112796@qq.com> (@a1012112796)
4040
Karl Heinz Marbaise <kama@soebes.de> (@khmarbaise)
4141
Norwin Roosen <git@nroo.de> (@noerw)
42+
Kyle Dumont <kdumontnu@gmail.com> (@kdumontnu)

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ GO_SOURCES_OWN := $(filter-out vendor/% %/bindata.go, $(GO_SOURCES))
127127
#To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger
128128
SWAGGER := $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger
129129
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
130-
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
131-
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
130+
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g
131+
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g
132132
SWAGGER_EXCLUDE := code.gitea.io/sdk
133133
SWAGGER_NEWLINE_COMMAND := -e '$$a\'
134134

@@ -596,7 +596,7 @@ release-darwin: | $(DIST_DIRS)
596596
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
597597
$(GO) install src.techknowlogick.com/xgo@latest; \
598598
fi
599-
CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64' -out gitea-$(VERSION) .
599+
CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) .
600600
ifeq ($(CI),drone)
601601
cp /build/* $(DIST)/binaries
602602
endif

cmd/web.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func runHTTPRedirector() {
6464
http.Redirect(w, r, target, http.StatusTemporaryRedirect)
6565
})
6666

67-
var err = runHTTP("tcp", source, context2.ClearHandler(handler))
67+
var err = runHTTP("tcp", source, "HTTP Redirector", context2.ClearHandler(handler))
6868

6969
if err != nil {
7070
log.Fatal("Failed to start port redirection: %v", err)
@@ -198,7 +198,7 @@ func listen(m http.Handler, handleRedirector bool) error {
198198
if handleRedirector {
199199
NoHTTPRedirector()
200200
}
201-
err = runHTTP("tcp", listenAddr, context2.ClearHandler(m))
201+
err = runHTTP("tcp", listenAddr, "Web", context2.ClearHandler(m))
202202
case setting.HTTPS:
203203
if setting.EnableLetsEncrypt {
204204
err = runLetsEncrypt(listenAddr, setting.Domain, setting.LetsEncryptDirectory, setting.LetsEncryptEmail, context2.ClearHandler(m))
@@ -211,22 +211,22 @@ func listen(m http.Handler, handleRedirector bool) error {
211211
NoHTTPRedirector()
212212
}
213213
}
214-
err = runHTTPS("tcp", listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
214+
err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
215215
case setting.FCGI:
216216
if handleRedirector {
217217
NoHTTPRedirector()
218218
}
219-
err = runFCGI("tcp", listenAddr, context2.ClearHandler(m))
219+
err = runFCGI("tcp", listenAddr, "FCGI Web", context2.ClearHandler(m))
220220
case setting.UnixSocket:
221221
if handleRedirector {
222222
NoHTTPRedirector()
223223
}
224-
err = runHTTP("unix", listenAddr, context2.ClearHandler(m))
224+
err = runHTTP("unix", listenAddr, "Web", context2.ClearHandler(m))
225225
case setting.FCGIUnix:
226226
if handleRedirector {
227227
NoHTTPRedirector()
228228
}
229-
err = runFCGI("unix", listenAddr, context2.ClearHandler(m))
229+
err = runFCGI("unix", listenAddr, "Web", context2.ClearHandler(m))
230230
default:
231231
log.Fatal("Invalid protocol: %s", setting.Protocol)
232232
}

cmd/web_graceful.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ import (
1414
"code.gitea.io/gitea/modules/log"
1515
)
1616

17-
func runHTTP(network, listenAddr string, m http.Handler) error {
18-
return graceful.HTTPListenAndServe(network, listenAddr, m)
17+
func runHTTP(network, listenAddr, name string, m http.Handler) error {
18+
return graceful.HTTPListenAndServe(network, listenAddr, name, m)
1919
}
2020

21-
func runHTTPS(network, listenAddr, certFile, keyFile string, m http.Handler) error {
22-
return graceful.HTTPListenAndServeTLS(network, listenAddr, certFile, keyFile, m)
21+
func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handler) error {
22+
return graceful.HTTPListenAndServeTLS(network, listenAddr, name, certFile, keyFile, m)
2323
}
2424

25-
func runHTTPSWithTLSConfig(network, listenAddr string, tlsConfig *tls.Config, m http.Handler) error {
26-
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, tlsConfig, m)
25+
func runHTTPSWithTLSConfig(network, listenAddr, name string, tlsConfig *tls.Config, m http.Handler) error {
26+
return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m)
2727
}
2828

2929
// NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector
@@ -43,9 +43,9 @@ func NoInstallListener() {
4343
graceful.GetManager().InformCleanup()
4444
}
4545

46-
func runFCGI(network, listenAddr string, m http.Handler) error {
46+
func runFCGI(network, listenAddr, name string, m http.Handler) error {
4747
// This needs to handle stdin as fcgi point
48-
fcgiServer := graceful.NewServer(network, listenAddr)
48+
fcgiServer := graceful.NewServer(network, listenAddr, name)
4949

5050
err := fcgiServer.ListenAndServe(func(listener net.Listener) error {
5151
return fcgi.Serve(listener, m)

cmd/web_letsencrypt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
4646
go func() {
4747
log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect)
4848
// all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here)
49-
var err = runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, myACME.HTTPChallengeHandler(http.HandlerFunc(runLetsEncryptFallbackHandler)))
49+
var err = runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, "Let's Encrypt HTTP Challenge", myACME.HTTPChallengeHandler(http.HandlerFunc(runLetsEncryptFallbackHandler)))
5050
if err != nil {
5151
log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err)
5252
}
5353
}()
5454
}
5555

56-
return runHTTPSWithTLSConfig("tcp", listenAddr, tlsConfig, context2.ClearHandler(m))
56+
return runHTTPSWithTLSConfig("tcp", listenAddr, "Web", tlsConfig, context2.ClearHandler(m))
5757
}
5858

5959
func runLetsEncryptFallbackHandler(w http.ResponseWriter, r *http.Request) {

custom/conf/app.example.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ SSH_SERVER_KEY_EXCHANGES = diffie-hellman-group1-sha1, diffie-hellman-group14-sh
319319
; For the built-in SSH server, choose the MACs to support for SSH connections,
320320
; for system SSH this setting has no effect
321321
SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96
322+
; For the built-in SSH server, choose the keypair to offer as the host key
323+
; The private key should be at SSH_SERVER_HOST_KEY and the public SSH_SERVER_HOST_KEY.pub
324+
; relative paths are made absolute relative to the APP_DATA_PATH
325+
SSH_SERVER_HOST_KEYS=ssh/gitea.rsa, ssh/gogs.rsa
322326
; Directory to create temporary files in when testing public keys using ssh-keygen,
323327
; default is the system temporary directory.
324328
SSH_KEY_TEST_PATH =
@@ -794,6 +798,8 @@ COOKIE_SECURE = false
794798
GC_INTERVAL_TIME = 86400
795799
; Session life time in seconds, default is 86400 (1 day)
796800
SESSION_LIFE_TIME = 86400
801+
; SameSite settings. Either "none", "lax", or "strict"
802+
SAME_SITE=lax
797803

798804
[picture]
799805
AVATAR_UPLOAD_PATH = data/avatars

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.13.2
21+
version: 1.13.3
2222
minGoVersion: 1.14
2323
goVersion: 1.16
2424
minNodeVersion: 10.13

0 commit comments

Comments
 (0)