From 290f458d46d4774ac47dca40af4e1c8b9bea755e Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 1 Jul 2021 17:13:20 +0200 Subject: [PATCH] Reserve user/repo pattern for rss feature (#16323) --- models/repo.go | 2 +- models/user.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/repo.go b/models/repo.go index 92d8427fab..009e7a457d 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1035,7 +1035,7 @@ func GetRepoInitFile(tp, name string) ([]byte, error) { var ( reservedRepoNames = []string{".", ".."} - reservedRepoPatterns = []string{"*.git", "*.wiki"} + reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"} ) // IsUsableRepoName returns true when repository is usable diff --git a/models/user.go b/models/user.go index 47d24aefd6..ce96a144af 100644 --- a/models/user.go +++ b/models/user.go @@ -814,7 +814,7 @@ var ( "user", } - reservedUserPatterns = []string{"*.keys", "*.gpg"} + reservedUserPatterns = []string{"*.keys", "*.gpg", "*.rss", "*.atom"} ) // isUsableName checks if name is reserved or pattern of name is not allowed