aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2023-04-10 22:14:16 +0200
committerGitHub <noreply@github.com>2023-04-10 16:14:16 -0400
commit2b91841cd3e1213ff3e4ed4209d6a4be89c2fa79 (patch)
treeb39b094253b82a8e0101597d2ef61390b493d455 /models
parenteb397c3e631099686f8c11cbd0ca303fd37908ba (diff)
downloadgitea-2b91841cd3e1213ff3e4ed4209d6a4be89c2fa79.tar.gz
gitea-2b91841cd3e1213ff3e4ed4209d6a4be89c2fa79.zip
Reserve ".png" suffix for user/org names (#23992)
Org/User names ending with ".png" where not functional, so reserve them alternative / close #23908
Diffstat (limited to 'models')
-rw-r--r--models/user/user.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/user/user.go b/models/user/user.go
index 82c2d3b6cd..5709ed7ff2 100644
--- a/models/user/user.go
+++ b/models/user/user.go
@@ -537,7 +537,8 @@ var (
"gitea-actions",
}
- reservedUserPatterns = []string{"*.keys", "*.gpg", "*.rss", "*.atom"}
+ // DON'T ADD ANY NEW STUFF, WE SOLVE THIS WITH `/user/{obj}` PATHS!
+ reservedUserPatterns = []string{"*.keys", "*.gpg", "*.rss", "*.atom", "*.png"}
)
// IsUsableUsername returns an error when a username is reserved