Skip to content

Commit e129316

Browse files
authored
Merge branch 'main' into invalid-csrf-redirect
2 parents f23b496 + fc1607b commit e129316

File tree

608 files changed

+37681
-22874
lines changed

Some content is hidden

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

608 files changed

+37681
-22874
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ steps:
404404

405405
- name: update
406406
pull: default
407-
image: alpine:3.13
407+
image: alpine:3.14
408408
commands:
409409
- ./build/update-locales.sh
410410

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ 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.14.4](https://github.com/go-gitea/gitea/releases/tag/v1.14.4) - 2021-07-06
8+
9+
* BUGFIXES
10+
* Fix relative links in postprocessed images (#16334) (#16340)
11+
* Fix list_options GetStartEnd (#16303) (#16305)
12+
* Fix API to use author for commits instead of committer (#16276) (#16277)
13+
* Handle misencoding of login_source cfg in mssql (#16268) (#16275)
14+
* Fixed issues not updated by commits (#16254) (#16261)
15+
* Improve efficiency in FindRenderizableReferenceNumeric and getReference (#16251) (#16255)
16+
* Use html.Parse rather than html.ParseFragment (#16223) (#16225)
17+
* Fix milestone counters on new issue (#16183) (#16224)
18+
* reqOrgMembership calls need to be preceded by reqToken (#16198) (#16219)
19+
720
## [1.14.3](https://github.com/go-gitea/gitea/releases/tag/v1.14.3) - 2021-06-18
821

922
* SECURITY

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
###################################
33
#Build stage
4-
FROM golang:1.16-alpine3.13 AS build-env
4+
FROM golang:1.16-alpine3.14 AS build-env
55

66
ARG GOPROXY
77
ENV GOPROXY ${GOPROXY:-direct}
@@ -25,7 +25,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2525
# Begin env-to-ini build
2626
RUN go build contrib/environment-to-ini/environment-to-ini.go
2727

28-
FROM alpine:3.13
28+
FROM alpine:3.14
2929
LABEL maintainer="[email protected]"
3030

3131
EXPOSE 22 3000

Dockerfile.rootless

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
###################################
33
#Build stage
4-
FROM golang:1.16-alpine3.13 AS build-env
4+
FROM golang:1.16-alpine3.14 AS build-env
55

66
ARG GOPROXY
77
ENV GOPROXY ${GOPROXY:-direct}
@@ -25,7 +25,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2525
# Begin env-to-ini build
2626
RUN go build contrib/environment-to-ini/environment-to-ini.go
2727

28-
FROM alpine:3.13
28+
FROM alpine:3.14
2929
LABEL maintainer="[email protected]"
3030

3131
EXPOSE 2222 3000

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ misspell-check:
297297
GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \
298298
fi
299299
@echo "Running misspell-check..."
300-
@misspell -error -i unknwon,destory $(GO_SOURCES_OWN)
300+
@misspell -error -i unknwon $(GO_SOURCES_OWN)
301301

302302
.PHONY: misspell
303303
misspell:

cmd/dump.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func runDump(ctx *cli.Context) error {
280280
}
281281

282282
if ctx.IsSet("skip-custom-dir") && ctx.Bool("skip-custom-dir") {
283-
log.Info("Skiping custom directory")
283+
log.Info("Skipping custom directory")
284284
} else {
285285
customDir, err := os.Stat(setting.CustomPath)
286286
if err == nil && customDir.IsDir() {

cmd/hook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Gitea or set your environment appropriately.`, "")
165165
}
166166
}
167167

168-
// the environment setted on serv command
168+
// the environment is set by serv command
169169
isWiki := os.Getenv(models.EnvRepoIsWiki) == "true"
170170
username := os.Getenv(models.EnvRepoUsername)
171171
reponame := os.Getenv(models.EnvRepoName)
@@ -320,7 +320,7 @@ Gitea or set your environment appropriately.`, "")
320320
}
321321
}
322322

323-
// the environment setted on serv command
323+
// the environment is set by serv command
324324
repoUser := os.Getenv(models.EnvRepoUsername)
325325
isWiki := os.Getenv(models.EnvRepoIsWiki) == "true"
326326
repoName := os.Getenv(models.EnvRepoName)

cmd/migrate_storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func runMigrateStorage(ctx *cli.Context) error {
184184
return fmt.Errorf("Unsupported storage: %s", ctx.String("type"))
185185
}
186186

187-
log.Warn("All files have been copied to the new placement but old files are still on the orignial placement.")
187+
log.Warn("All files have been copied to the new placement but old files are still on the original placement.")
188188

189189
return nil
190190
}

cmd/serv.go

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
package cmd
77

88
import (
9+
"context"
910
"fmt"
1011
"net/http"
1112
"net/url"
1213
"os"
1314
"os/exec"
15+
"os/signal"
1416
"regexp"
1517
"strconv"
1618
"strings"
19+
"syscall"
1720
"time"
1821

1922
"code.gitea.io/gitea/models"
@@ -273,12 +276,31 @@ func runServ(c *cli.Context) error {
273276
verb = strings.Replace(verb, "-", " ", 1)
274277
}
275278

279+
ctx, cancel := context.WithCancel(context.Background())
280+
defer cancel()
281+
go func() {
282+
// install notify
283+
signalChannel := make(chan os.Signal, 1)
284+
285+
signal.Notify(
286+
signalChannel,
287+
syscall.SIGINT,
288+
syscall.SIGTERM,
289+
)
290+
select {
291+
case <-signalChannel:
292+
case <-ctx.Done():
293+
}
294+
cancel()
295+
signal.Reset()
296+
}()
297+
276298
var gitcmd *exec.Cmd
277299
verbs := strings.Split(verb, " ")
278300
if len(verbs) == 2 {
279-
gitcmd = exec.Command(verbs[0], verbs[1], repoPath)
301+
gitcmd = exec.CommandContext(ctx, verbs[0], verbs[1], repoPath)
280302
} else {
281-
gitcmd = exec.Command(verb, repoPath)
303+
gitcmd = exec.CommandContext(ctx, verb, repoPath)
282304
}
283305

284306
gitcmd.Dir = setting.RepoRootPath

cmd/web_letsencrypt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler) error {
2020

2121
// If HTTP Challenge enabled, needs to be serving on port 80. For TLSALPN needs 443.
22-
// Due to docker port mapping this can't be checked programatically
22+
// Due to docker port mapping this can't be checked programmatically
2323
// TODO: these are placeholders until we add options for each in settings with appropriate warning
2424
enableHTTPChallenge := true
2525
enableTLSALPNChallenge := true

0 commit comments

Comments
 (0)