浏览代码

#3461 fix security issue of REAMDE path in create repository

tags/v0.9.99
Unknwon 7 年前
父节点
当前提交
cc647ba9d5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      models/repo.go

+ 1
- 1
models/repo.go 查看文件

@@ -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)

正在加载...
取消
保存