Update reserved usernames list (#18438)

Adding additional usernames which are already routes, remove unused ones.
In future, avoid reserving names as much as possible, use `/-/` in path instead.
This commit is contained in:
Gusted 2022-03-31 06:02:13 +02:00 committed by GitHub
parent ba5f2acb9c
commit 43332a483f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 10 deletions

View file

@ -75,23 +75,41 @@ func TestRenameReservedUsername(t *testing.T) {
defer prepareTestEnv(t)()
reservedUsernames := []string{
".",
"..",
".well-known",
"admin",
"api",
"assets",
"attachments",
"avatar",
"avatars",
"captcha",
"commits",
"debug",
"error",
"explore",
"help",
"install",
"favicon.ico",
"ghost",
"issues",
"login",
"manifest.json",
"metrics",
"milestones",
"new",
"notifications",
"org",
"pulls",
"raw",
"repo",
"template",
"user",
"repo-avatars",
"robots.txt",
"search",
"serviceworker.js",
"ssh_info",
"swagger.v1.json",
"user",
"v2",
}
session := loginUser(t, "user2")

View file

@ -576,6 +576,7 @@ var (
"api",
"assets",
"attachments",
"avatar",
"avatars",
"captcha",
"commits",
@ -584,10 +585,7 @@ var (
"explore",
"favicon.ico",
"ghost",
"help",
"install",
"issues",
"less",
"login",
"manifest.json",
"metrics",
@ -595,15 +593,15 @@ var (
"new",
"notifications",
"org",
"plugins",
"pulls",
"raw",
"repo",
"repo-avatars",
"robots.txt",
"search",
"serviceworker.js",
"stars",
"template",
"ssh_info",
"swagger.v1.json",
"user",
"v2",
}