filter invalid topics

This commit is contained in:
root 2024-12-01 05:35:39 +00:00
parent 1b62110914
commit 7a8a2ce030

View file

@ -237,7 +237,7 @@ func main() {
"msh/+/+/+/+/2/map/",
"msh/+/+/+/+/2/e/+/+",
},
TopicRegex: regexp.MustCompile(`/2/e/[^/]+/![0-9a-f]+$|/2/map/$`),
TopicRegex: regexp.MustCompile(`^msh(?:/[^/]+)+/2/(?:e/[^/]+/![0-9a-f]+|map/)$`),
Accept: func(from uint32) bool {
_, found := blocked[from]
return !found