Use roots value validator functions.
This commit is contained in:
@@ -3,7 +3,7 @@ module git.wisehodl.dev/jay/go-heartwood
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
git.wisehodl.dev/jay/go-roots v0.3.1
|
||||
git.wisehodl.dev/jay/go-roots v0.4.1
|
||||
github.com/boltdb/bolt v1.3.1
|
||||
github.com/neo4j/neo4j-go-driver/v6 v6.0.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ func ExpandTaggedEvents(e roots.Event, s *EventSubgraph) {
|
||||
name := tag[0]
|
||||
value := tag[1]
|
||||
|
||||
if name != "e" || !roots.Hex64Pattern.MatchString(value) {
|
||||
if name != "e" || !roots.IsValidID(value) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ func ExpandTaggedUsers(e roots.Event, s *EventSubgraph) {
|
||||
name := tag[0]
|
||||
value := tag[1]
|
||||
|
||||
if name != "p" || !roots.Hex64Pattern.MatchString(value) {
|
||||
if name != "p" || !roots.IsValidKey(value) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user