Skip to content

Commit f4c8121

Browse files
authored
Merge branch 'master' into jest
2 parents 46879b0 + 4eea819 commit f4c8121

Some content is hidden

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

71 files changed

+473
-362
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ 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.0-RC2](https://github.com/go-gitea/gitea/releases/tag/v1.14.0-rc2) - 2021-03-22
8+
9+
* SECURITY
10+
* Fix bug on avatar middleware (#15124) (#15125)
11+
* Fix another clusterfuzz identified issue (#15096) (#15113)
12+
* Update to goldmark 1.3.3 (#15059) (#15060)
13+
* BUGFIXES
14+
* Fix the v176 migration (#15110) (#15111)
15+
* Fix double 'push tag' action feed (#15078) (#15083)
16+
* Remove possible resource leak (#15067) (#15082)
17+
* Handle unauthorized user events gracefully (#15071) (#15074)
18+
719
## [1.14.0-RC1](https://github.com/go-gitea/gitea/releases/tag/v1.14.0-rc1) - 2021-03-19
820

921
* SECURITY
@@ -267,6 +279,31 @@ been added to each release, please refer to the [blog](https://blog.gitea.io).
267279
* Reduce make verbosity (#13803)
268280
* Add git command error directory on log (#13194)
269281

282+
## [1.13.7](https://github.com/go-gitea/gitea/releases/tag/v1.13.7) - 2021-04-07
283+
284+
* SECURITY
285+
* Update to bluemonday-1.0.6 (#15294) (#15298)
286+
* Clusterfuzz found another way (#15160) (#15169)
287+
* API
288+
* Fix wrong user returned in API (#15139) (#15150)
289+
* BUGFIXES
290+
* Add 'fonts' into 'KnownPublicEntries' (#15188) (#15317)
291+
* Speed up `enry.IsVendor` (#15213) (#15246)
292+
* Response 404 for diff/patch of a commit that not exist (#15221) (#15238)
293+
* Prevent NPE in CommentMustAsDiff if no hunk header (#15199) (#15201)
294+
* MISC
295+
* Add size to Save function (#15264) (#15271)
296+
297+
## [1.13.6](https://github.com/go-gitea/gitea/releases/tag/v1.13.6) - 2021-03-23
298+
299+
* SECURITY
300+
* Fix bug on avatar middleware (#15124) (#15125)
301+
* Fix another clusterfuzz identified issue (#15096) (#15114)
302+
* API
303+
* Fix nil exeption for get pull reviews API #15104 (#15106)
304+
* BUGFIXES
305+
* Fix markdown rendering in milestone content (#15056) (#15092)
306+
270307
## [1.13.5](https://github.com/go-gitea/gitea/releases/tag/v1.13.5) - 2021-03-21
271308

272309
* SECURITY

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.6
21+
version: 1.13.7
2222
minGoVersion: 1.14
2323
goVersion: 1.16
2424
minNodeVersion: 12.17

integrations/api_helper_for_declarative_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import (
1414
"time"
1515

1616
"code.gitea.io/gitea/models"
17-
auth "code.gitea.io/gitea/modules/forms"
1817
"code.gitea.io/gitea/modules/queue"
1918
api "code.gitea.io/gitea/modules/structs"
19+
"code.gitea.io/gitea/services/forms"
2020

2121
jsoniter "github.com/json-iterator/go"
2222
"github.com/stretchr/testify/assert"
@@ -243,7 +243,7 @@ func doAPIMergePullRequest(ctx APITestContext, owner, repo string, index int64)
243243
return func(t *testing.T) {
244244
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s",
245245
owner, repo, index, ctx.Token)
246-
req := NewRequestWithJSON(t, http.MethodPost, urlStr, &auth.MergePullRequestForm{
246+
req := NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{
247247
MergeMessageField: "doAPIMergePullRequest Merge",
248248
Do: string(models.MergeStyleMerge),
249249
})
@@ -255,7 +255,7 @@ func doAPIMergePullRequest(ctx APITestContext, owner, repo string, index int64)
255255
DecodeJSON(t, resp, &err)
256256
assert.EqualValues(t, "Please try again later", err.Message)
257257
queue.GetManager().FlushAll(context.Background(), 5*time.Second)
258-
req = NewRequestWithJSON(t, http.MethodPost, urlStr, &auth.MergePullRequestForm{
258+
req = NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{
259259
MergeMessageField: "doAPIMergePullRequest Merge",
260260
Do: string(models.MergeStyleMerge),
261261
})
@@ -278,7 +278,7 @@ func doAPIManuallyMergePullRequest(ctx APITestContext, owner, repo, commitID str
278278
return func(t *testing.T) {
279279
urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s",
280280
owner, repo, index, ctx.Token)
281-
req := NewRequestWithJSON(t, http.MethodPost, urlStr, &auth.MergePullRequestForm{
281+
req := NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{
282282
Do: string(models.MergeStyleManuallyMerged),
283283
MergeCommitID: commitID,
284284
})

integrations/api_pull_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"testing"
1111

1212
"code.gitea.io/gitea/models"
13-
auth "code.gitea.io/gitea/modules/forms"
1413
"code.gitea.io/gitea/modules/setting"
1514
api "code.gitea.io/gitea/modules/structs"
15+
"code.gitea.io/gitea/services/forms"
1616
issue_service "code.gitea.io/gitea/services/issue"
1717

1818
"github.com/stretchr/testify/assert"
@@ -50,7 +50,7 @@ func TestAPIMergePullWIP(t *testing.T) {
5050

5151
session := loginUser(t, owner.Name)
5252
token := getTokenForLoggedInUser(t, session)
53-
req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", owner.Name, repo.Name, pr.Index, token), &auth.MergePullRequestForm{
53+
req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", owner.Name, repo.Name, pr.Index, token), &forms.MergePullRequestForm{
5454
MergeMessageField: pr.Issue.Title,
5555
Do: string(models.MergeStyleMerge),
5656
})

options/locale/locale_es-ES.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,13 @@ reset_password=Recupere su cuenta
319319
register_success=Registro completado
320320
register_notify=¡Bienvenido a Gitea
321321

322+
release.new.subject=%s en %s publicado
322323

324+
repo.transfer.subject_to=%s desea transferir "%s" a %s
325+
repo.transfer.subject_to_you=%s desea transferir "%s" a usted
326+
repo.transfer.to_you=usted
323327

328+
repo.collaborator.added.subject=%s le añadió en %s
324329

325330
[modal]
326331
yes=Sí
@@ -1862,6 +1867,7 @@ diff.whitespace_ignore_at_eol=Ignorar cambios en espacios en blanco al final de
18621867
diff.stats_desc=Se han <strong>modificado %d ficheros</strong> con <strong>%d adiciones</strong> y <strong>%d borrados</strong>
18631868
diff.stats_desc_file=%d cambios: %d adiciones y %d eliminaciones
18641869
diff.bin=BIN
1870+
diff.bin_not_shown=Archivo binario no mostrado.
18651871
diff.view_file=Ver fichero
18661872
diff.file_before=Antes
18671873
diff.file_after=Después
@@ -1962,6 +1968,9 @@ topic.done=Hecho
19621968
topic.count_prompt=No puede seleccionar más de 25 temas
19631969
topic.format_prompt=Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
19641970

1971+
error.csv.too_large=No se puede renderizar este archivo porque es demasiado grande.
1972+
error.csv.unexpected=No se puede procesar este archivo porque contiene un carácter inesperado en la línea %d y la columna %d.
1973+
error.csv.invalid_field_count=No se puede procesar este archivo porque tiene un número incorrecto de campos en la línea %d.
19651974

19661975
[org]
19671976
org_name_holder=Nombre de la organización

routers/admin/admin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ import (
1919
"code.gitea.io/gitea/modules/base"
2020
"code.gitea.io/gitea/modules/context"
2121
"code.gitea.io/gitea/modules/cron"
22-
auth "code.gitea.io/gitea/modules/forms"
2322
"code.gitea.io/gitea/modules/git"
2423
"code.gitea.io/gitea/modules/log"
2524
"code.gitea.io/gitea/modules/process"
2625
"code.gitea.io/gitea/modules/queue"
2726
"code.gitea.io/gitea/modules/setting"
2827
"code.gitea.io/gitea/modules/timeutil"
2928
"code.gitea.io/gitea/modules/web"
29+
"code.gitea.io/gitea/services/forms"
3030
"code.gitea.io/gitea/services/mailer"
3131
jsoniter "github.com/json-iterator/go"
3232

@@ -134,7 +134,7 @@ func Dashboard(ctx *context.Context) {
134134

135135
// DashboardPost run an admin operation
136136
func DashboardPost(ctx *context.Context) {
137-
form := web.GetForm(ctx).(*auth.AdminDashboardForm)
137+
form := web.GetForm(ctx).(*forms.AdminDashboardForm)
138138
ctx.Data["Title"] = ctx.Tr("admin.dashboard")
139139
ctx.Data["PageIsAdmin"] = true
140140
ctx.Data["PageIsAdminDashboard"] = true

routers/admin/auths.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import (
1616
"code.gitea.io/gitea/modules/auth/pam"
1717
"code.gitea.io/gitea/modules/base"
1818
"code.gitea.io/gitea/modules/context"
19-
auth "code.gitea.io/gitea/modules/forms"
2019
"code.gitea.io/gitea/modules/log"
2120
"code.gitea.io/gitea/modules/setting"
2221
"code.gitea.io/gitea/modules/util"
2322
"code.gitea.io/gitea/modules/web"
23+
"code.gitea.io/gitea/services/forms"
2424

2525
"xorm.io/xorm/convert"
2626
)
@@ -113,7 +113,7 @@ func NewAuthSource(ctx *context.Context) {
113113
ctx.HTML(http.StatusOK, tplAuthNew)
114114
}
115115

116-
func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
116+
func parseLDAPConfig(form forms.AuthenticationForm) *models.LDAPConfig {
117117
var pageSize uint32
118118
if form.UsePagedSearch {
119119
pageSize = uint32(form.SearchPageSize)
@@ -150,7 +150,7 @@ func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
150150
}
151151
}
152152

153-
func parseSMTPConfig(form auth.AuthenticationForm) *models.SMTPConfig {
153+
func parseSMTPConfig(form forms.AuthenticationForm) *models.SMTPConfig {
154154
return &models.SMTPConfig{
155155
Auth: form.SMTPAuth,
156156
Host: form.SMTPHost,
@@ -161,7 +161,7 @@ func parseSMTPConfig(form auth.AuthenticationForm) *models.SMTPConfig {
161161
}
162162
}
163163

164-
func parseOAuth2Config(form auth.AuthenticationForm) *models.OAuth2Config {
164+
func parseOAuth2Config(form forms.AuthenticationForm) *models.OAuth2Config {
165165
var customURLMapping *oauth2.CustomURLMapping
166166
if form.Oauth2UseCustomURL {
167167
customURLMapping = &oauth2.CustomURLMapping{
@@ -183,7 +183,7 @@ func parseOAuth2Config(form auth.AuthenticationForm) *models.OAuth2Config {
183183
}
184184
}
185185

186-
func parseSSPIConfig(ctx *context.Context, form auth.AuthenticationForm) (*models.SSPIConfig, error) {
186+
func parseSSPIConfig(ctx *context.Context, form forms.AuthenticationForm) (*models.SSPIConfig, error) {
187187
if util.IsEmptyString(form.SSPISeparatorReplacement) {
188188
ctx.Data["Err_SSPISeparatorReplacement"] = true
189189
return nil, errors.New(ctx.Tr("form.SSPISeparatorReplacement") + ctx.Tr("form.require_error"))
@@ -209,7 +209,7 @@ func parseSSPIConfig(ctx *context.Context, form auth.AuthenticationForm) (*model
209209

210210
// NewAuthSourcePost response for adding an auth source
211211
func NewAuthSourcePost(ctx *context.Context) {
212-
form := *web.GetForm(ctx).(*auth.AuthenticationForm)
212+
form := *web.GetForm(ctx).(*forms.AuthenticationForm)
213213
ctx.Data["Title"] = ctx.Tr("admin.auths.new")
214214
ctx.Data["PageIsAdmin"] = true
215215
ctx.Data["PageIsAdminAuthentications"] = true
@@ -316,7 +316,7 @@ func EditAuthSource(ctx *context.Context) {
316316

317317
// EditAuthSourcePost response for editing auth source
318318
func EditAuthSourcePost(ctx *context.Context) {
319-
form := *web.GetForm(ctx).(*auth.AuthenticationForm)
319+
form := *web.GetForm(ctx).(*forms.AuthenticationForm)
320320
ctx.Data["Title"] = ctx.Tr("admin.auths.edit")
321321
ctx.Data["PageIsAdmin"] = true
322322
ctx.Data["PageIsAdminAuthentications"] = true

routers/admin/users.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import (
1414
"code.gitea.io/gitea/models"
1515
"code.gitea.io/gitea/modules/base"
1616
"code.gitea.io/gitea/modules/context"
17-
auth "code.gitea.io/gitea/modules/forms"
1817
"code.gitea.io/gitea/modules/log"
1918
"code.gitea.io/gitea/modules/password"
2019
"code.gitea.io/gitea/modules/setting"
2120
"code.gitea.io/gitea/modules/web"
2221
"code.gitea.io/gitea/routers"
2322
router_user_setting "code.gitea.io/gitea/routers/user/setting"
23+
"code.gitea.io/gitea/services/forms"
2424
"code.gitea.io/gitea/services/mailer"
2525
)
2626

@@ -66,7 +66,7 @@ func NewUser(ctx *context.Context) {
6666

6767
// NewUserPost response for adding a new user
6868
func NewUserPost(ctx *context.Context) {
69-
form := web.GetForm(ctx).(*auth.AdminCreateUserForm)
69+
form := web.GetForm(ctx).(*forms.AdminCreateUserForm)
7070
ctx.Data["Title"] = ctx.Tr("admin.users.new_account")
7171
ctx.Data["PageIsAdmin"] = true
7272
ctx.Data["PageIsAdminUsers"] = true
@@ -218,7 +218,7 @@ func EditUser(ctx *context.Context) {
218218

219219
// EditUserPost response for editting user
220220
func EditUserPost(ctx *context.Context) {
221-
form := web.GetForm(ctx).(*auth.AdminEditUserForm)
221+
form := web.GetForm(ctx).(*forms.AdminEditUserForm)
222222
ctx.Data["Title"] = ctx.Tr("admin.users.edit_account")
223223
ctx.Data["PageIsAdmin"] = true
224224
ctx.Data["PageIsAdminUsers"] = true

routers/admin/users_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"testing"
99

1010
"code.gitea.io/gitea/models"
11-
auth "code.gitea.io/gitea/modules/forms"
1211
"code.gitea.io/gitea/modules/test"
1312
"code.gitea.io/gitea/modules/web"
13+
"code.gitea.io/gitea/services/forms"
1414

1515
"github.com/stretchr/testify/assert"
1616
)
@@ -30,7 +30,7 @@ func TestNewUserPost_MustChangePassword(t *testing.T) {
3030
username := "gitea"
3131
email := "[email protected]"
3232

33-
form := auth.AdminCreateUserForm{
33+
form := forms.AdminCreateUserForm{
3434
LoginType: "local",
3535
LoginName: "local",
3636
UserName: username,
@@ -68,7 +68,7 @@ func TestNewUserPost_MustChangePasswordFalse(t *testing.T) {
6868
username := "gitea"
6969
email := "[email protected]"
7070

71-
form := auth.AdminCreateUserForm{
71+
form := forms.AdminCreateUserForm{
7272
LoginType: "local",
7373
LoginName: "local",
7474
UserName: username,
@@ -106,7 +106,7 @@ func TestNewUserPost_InvalidEmail(t *testing.T) {
106106
username := "gitea"
107107
email := "[email protected]\r\n"
108108

109-
form := auth.AdminCreateUserForm{
109+
form := forms.AdminCreateUserForm{
110110
LoginType: "local",
111111
LoginName: "local",
112112
UserName: username,

routers/api/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ import (
7171

7272
"code.gitea.io/gitea/models"
7373
"code.gitea.io/gitea/modules/context"
74-
auth "code.gitea.io/gitea/modules/forms"
7574
"code.gitea.io/gitea/modules/log"
7675
"code.gitea.io/gitea/modules/setting"
7776
api "code.gitea.io/gitea/modules/structs"
@@ -84,6 +83,7 @@ import (
8483
"code.gitea.io/gitea/routers/api/v1/settings"
8584
_ "code.gitea.io/gitea/routers/api/v1/swagger" // for swagger generation
8685
"code.gitea.io/gitea/routers/api/v1/user"
86+
"code.gitea.io/gitea/services/forms"
8787

8888
"gitea.com/go-chi/binding"
8989
"gitea.com/go-chi/session"
@@ -897,7 +897,7 @@ func Routes() *web.Route {
897897
m.Get(".patch", repo.DownloadPullPatch)
898898
m.Post("/update", reqToken(), repo.UpdatePullRequest)
899899
m.Combo("/merge").Get(repo.IsPullRequestMerged).
900-
Post(reqToken(), mustNotBeArchived, bind(auth.MergePullRequestForm{}), repo.MergePullRequest)
900+
Post(reqToken(), mustNotBeArchived, bind(forms.MergePullRequestForm{}), repo.MergePullRequest)
901901
m.Group("/reviews", func() {
902902
m.Combo("").
903903
Get(repo.ListPullReviews).

0 commit comments

Comments
 (0)