]> source.dussan.org Git - gitea.git/commitdiff
Reserve user/repo pattern for rss feature (#16323)
author6543 <6543@obermui.de>
Thu, 1 Jul 2021 15:13:20 +0000 (17:13 +0200)
committerGitHub <noreply@github.com>
Thu, 1 Jul 2021 15:13:20 +0000 (23:13 +0800)
models/repo.go
models/user.go

index 92d8427fab525d8aa8af18f0f3eb4f9c5f28e769..009e7a457d07431ea8e361033ec1d8282a81ad21 100644 (file)
@@ -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
index 47d24aefd6aa4fc9329ab257bfec85986d44cc04..ce96a144af25de2d4bcd6de00b191d242d6f2769 100644 (file)
@@ -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