mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	#3229 disallow repository name . and ..
Since . and .. has browser automatical behaviors, we need to disallow those names.
This commit is contained in:
		@@ -518,7 +518,7 @@ func (repo *Repository) CloneLink() (cl *CloneLink) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	reservedNames    = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new"}
 | 
			
		||||
	reservedNames    = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new", ".", ".."}
 | 
			
		||||
	reservedPatterns = []string{"*.git", "*.keys", "*.wiki"}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user