mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 06:24:11 +01:00 
			
		
		
		
	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:
		
							parent
							
								
									ba5f2acb9c
								
							
						
					
					
						commit
						43332a483f
					
				@ -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")
 | 
			
		||||
 | 
			
		||||
@ -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",
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user