1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-10-10 12:10:31 +02:00

allow + in usernames

This commit is contained in:
Hunter Kehoe 2024-04-03 21:58:29 -06:00
parent 130039f5c8
commit e4d22ebd8b
2 changed files with 13 additions and 1 deletions

View file

@ -241,7 +241,7 @@ const (
)
var (
allowedUsernameRegex = regexp.MustCompile(`^[-_.@a-zA-Z0-9]+$`) // Does not include Everyone (*)
allowedUsernameRegex = regexp.MustCompile(`^[-_.+@a-zA-Z0-9]+$`) // Does not include Everyone (*)
allowedTopicRegex = regexp.MustCompile(`^[-_A-Za-z0-9]{1,64}$`) // No '*'
allowedTopicPatternRegex = regexp.MustCompile(`^[-_*A-Za-z0-9]{1,64}$`) // Adds '*' for wildcards!
allowedTierRegex = regexp.MustCompile(`^[-_A-Za-z0-9]{1,64}$`)