mirror of
https://codeberg.org/pronounscc/pronouns.cc.git
synced 2024-11-20 10:29:52 +01:00
fix: disallow * in member names, it breaks routing
This commit is contained in:
parent
65b171696a
commit
97391c51d8
1 changed files with 3 additions and 1 deletions
|
@ -41,12 +41,14 @@ const (
|
|||
)
|
||||
|
||||
// member names must match this regex
|
||||
var memberNameRegex = regexp.MustCompile("^[^@\\?!#/\\\\[\\]\"\\{\\}'$%&()+<=>^|~`,]{1,100}$")
|
||||
var memberNameRegex = regexp.MustCompile("^[^@\\?!#/\\\\[\\]\"\\{\\}'$%&()+<=>^|~`,\\*]{1,100}$")
|
||||
|
||||
// List of member names that cannot be used because they would break routing or be inaccessible due to page conflicts.
|
||||
var invalidMemberNames = []string{
|
||||
// these break routing outright
|
||||
".",
|
||||
"..",
|
||||
// the user edit page lives at `/@{username}/edit`, so a member named "edit" would be inaccessible
|
||||
"edit",
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue