enhance(repo): check full repo name for dangerous operations (#39213)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Mitrahsoft
2026-09-02 22:37:04 +05:30
committed by GitHub
parent f735df4dee
commit 8cf7330556
8 changed files with 67 additions and 70 deletions

View File

@@ -79,7 +79,7 @@ type MigrateRepoForm struct {
// RepoSettingForm form for changing repository settings
type RepoSettingForm struct {
middleware.FormDefaultValidator
RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"`
RepoName string `binding:"TrimSpace;Required;AlphaDashDot;MaxSize(100)"`
Description string `binding:"MaxSize(2048)"`
Website string `binding:"ValidUrl;MaxSize(1024)"`
Interval string