mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-13 20:26:01 +00:00
Address some CodeQL security concerns (#35572)
Although there is no real security problem
This commit is contained in:
@@ -605,7 +605,7 @@ func (repo *Repository) IsGenerated() bool {
|
||||
|
||||
// RepoPath returns repository path by given user and repository name.
|
||||
func RepoPath(userName, repoName string) string { //revive:disable-line:exported
|
||||
return filepath.Join(user_model.UserPath(userName), strings.ToLower(repoName)+".git")
|
||||
return filepath.Join(setting.RepoRootPath, filepath.Clean(strings.ToLower(userName)), filepath.Clean(strings.ToLower(repoName)+".git"))
|
||||
}
|
||||
|
||||
// RepoPath returns the repository path
|
||||
|
Reference in New Issue
Block a user