aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-08 07:34:05 +0800
committerUnknwon <u@gogs.io>2016-07-08 07:34:05 +0800
commite30c7013862a9d2c2ae60e403a1624e54475c4c7 (patch)
treeabb42971d394c9db63443b842f6e6881002b32c7
parent401bf944ef4b09e7d4ca85d7272dbd32e7e950a0 (diff)
downloadgitea-e30c7013862a9d2c2ae60e403a1624e54475c4c7.tar.gz
gitea-e30c7013862a9d2c2ae60e403a1624e54475c4c7.zip
#3229 disallow repository name . and ..
Since . and .. has browser automatical behaviors, we need to disallow those names.
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 786fc167bc..870e63b207 100644
--- a/models/repo.go
+++ b/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"}
)