mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	#3461 fix security issue of REAMDE path in create repository
This commit is contained in:
		@@ -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)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user