mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 22:13:26 +09:00
fix(repo): limit gitignore template selections (#39027)
Bound gitignore template selections at both web and API request boundaries before repository initialization. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -154,7 +154,7 @@ type CreateRepoOption struct {
|
|||||||
// Whether the repository is template
|
// Whether the repository is template
|
||||||
Template bool `json:"template"`
|
Template bool `json:"template"`
|
||||||
// Gitignores to use
|
// Gitignores to use
|
||||||
Gitignores string `json:"gitignores"`
|
Gitignores string `json:"gitignores" binding:"MaxSize(1024)"`
|
||||||
// License to use
|
// License to use
|
||||||
License string `json:"license" binding:"MaxSize(100)"`
|
License string `json:"license" binding:"MaxSize(100)"`
|
||||||
// Readme of the repository to create
|
// Readme of the repository to create
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ type CreateRepoForm struct {
|
|||||||
Description string `binding:"MaxSize(2048)"`
|
Description string `binding:"MaxSize(2048)"`
|
||||||
DefaultBranch string `binding:"GitRefName;MaxSize(100)"`
|
DefaultBranch string `binding:"GitRefName;MaxSize(100)"`
|
||||||
AutoInit bool
|
AutoInit bool
|
||||||
Gitignores string
|
Gitignores string `binding:"MaxSize(1024)"`
|
||||||
IssueLabels string `binding:"MaxSize(255)"`
|
IssueLabels string `binding:"MaxSize(255)"`
|
||||||
License string `binding:"MaxSize(100)"`
|
License string `binding:"MaxSize(100)"`
|
||||||
Readme string `binding:"MaxSize(255)"`
|
Readme string `binding:"MaxSize(255)"`
|
||||||
|
|||||||
Reference in New Issue
Block a user