summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-08-13 13:02:18 +0800
committerLauris BH <lauris@nix.lv>2018-08-13 08:02:18 +0300
commit52c2cb15db77a381880db7e44f133a49b3516dd5 (patch)
tree75a5170b57d5f90844ffcf44465339ecbe5045d3
parenta4fa6bbc89134d60bcbcaf1d8826aa769d017c91 (diff)
downloadgitea-52c2cb15db77a381880db7e44f133a49b3516dd5.tar.gz
gitea-52c2cb15db77a381880db7e44f133a49b3516dd5.zip
add vendor to user reserved words and format words list according alphabet (#4685)
-rw-r--r--models/user.go30
1 files changed, 29 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index 32b9bfec9b..a68b23568b 100644
--- a/models/user.go
+++ b/models/user.go
@@ -683,7 +683,35 @@ func NewGhostUser() *User {
}
var (
- reservedUsernames = []string{"assets", "css", "explore", "img", "js", "less", "plugins", "debug", "raw", "install", "api", "avatars", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "error", "new", ".", ".."}
+ reservedUsernames = []string{
+ "admin",
+ "api",
+ "assets",
+ "avatars",
+ "commits",
+ "css",
+ "debug",
+ "error",
+ "explore",
+ "help",
+ "img",
+ "install",
+ "issues",
+ "js",
+ "less",
+ "new",
+ "org",
+ "plugins",
+ "pulls",
+ "raw",
+ "repo",
+ "stars",
+ "template",
+ "user",
+ "vendor",
+ ".",
+ "..",
+ }
reservedUserPatterns = []string{"*.keys"}
)