Browse Source

#3229 disallow repository name . and ..

Since . and .. has browser automatical behaviors, we need to disallow those names.
tags/v0.9.99
Unknwon 8 years ago
parent
commit
e30c701386
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      models/repo.go

+ 1
- 1
models/repo.go View File

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


Loading…
Cancel
Save