mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix path cleanup in multiple places (#3871)
This commit is contained in:
parent
fff022ef8a
commit
181b3a8f09
3 changed files with 17 additions and 7 deletions
|
@ -1133,7 +1133,7 @@ type CreateRepoOptions struct {
|
|||
}
|
||||
|
||||
func getRepoInitFile(tp, name string) ([]byte, error) {
|
||||
cleanedName := strings.TrimLeft(name, "./")
|
||||
cleanedName := strings.TrimLeft(path.Clean("/"+name), "/")
|
||||
relPath := path.Join("options", tp, cleanedName)
|
||||
|
||||
// Use custom file when available.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue