mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 05:09:31 +01:00
#3461 fix security issue of REAMDE path in create repository
This commit is contained in:
parent
5e89485cec
commit
cc647ba9d5
1 changed files with 1 additions and 1 deletions
|
@ -870,7 +870,7 @@ type CreateRepoOptions struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func getRepoInitFile(tp, name string) ([]byte, error) {
|
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.
|
// Use custom file when available.
|
||||||
customPath := path.Join(setting.CustomPath, relPath)
|
customPath := path.Join(setting.CustomPath, relPath)
|
||||||
|
|
Loading…
Reference in a new issue