Procházet zdrojové kódy

#3229 disallow repository name . and ..

Since . and .. has browser automatical behaviors, we need to disallow those names.
Unknwon před 8 roky
rodič
revize
e30c701386
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      models/repo.go

+ 1 - 1
models/repo.go

@@ -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"}
 )