Browse Source

#3461 fix security issue of REAMDE path in create repository

tags/v1.21.12.1
Unknwon 9 years ago
parent
commit
cc647ba9d5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/repo.go

+ 1
- 1
models/repo.go View File

@@ -870,7 +870,7 @@ type CreateRepoOptions struct {
}

func getRepoInitFile(tp, name string) ([]byte, error) {
relPath := path.Join("conf", tp, name)
relPath := path.Join("conf", tp, strings.TrimLeft(name, "./"))

// Use custom file when available.
customPath := path.Join(setting.CustomPath, relPath)


Loading…
Cancel
Save