aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-07-01 17:13:20 +0200
committerGitHub <noreply@github.com>2021-07-01 23:13:20 +0800
commit290f458d46d4774ac47dca40af4e1c8b9bea755e (patch)
treee5e9183ad266065eb1f751714bfee322c3283813 /models
parentfc1d9629c61a6beb4afc92aee2c34292a919a1c3 (diff)
downloadgitea-290f458d46d4774ac47dca40af4e1c8b9bea755e.tar.gz
gitea-290f458d46d4774ac47dca40af4e1c8b9bea755e.zip
Reserve user/repo pattern for rss feature (#16323)
Diffstat (limited to 'models')
-rw-r--r--models/repo.go2
-rw-r--r--models/user.go2
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