Reserve user/repo pattern for rss feature (#16323)

tokarchuk/v1.17
6543 3 years ago committed by GitHub
parent fc1d9629c6
commit 290f458d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      models/repo.go
  2. 2
      models/user.go

@ -1035,7 +1035,7 @@ func GetRepoInitFile(tp, name string) ([]byte, error) {
var ( var (
reservedRepoNames = []string{".", ".."} reservedRepoNames = []string{".", ".."}
reservedRepoPatterns = []string{"*.git", "*.wiki"} reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"}
) )
// IsUsableRepoName returns true when repository is usable // IsUsableRepoName returns true when repository is usable

@ -814,7 +814,7 @@ var (
"user", "user",
} }
reservedUserPatterns = []string{"*.keys", "*.gpg"} reservedUserPatterns = []string{"*.keys", "*.gpg", "*.rss", "*.atom"}
) )
// isUsableName checks if name is reserved or pattern of name is not allowed // isUsableName checks if name is reserved or pattern of name is not allowed

Loading…
Cancel
Save