mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-03-17 13:22:56 +01:00
nip92: fix imeta parsing to guard against invalid tags.
This commit is contained in:
parent
c15904ba7b
commit
f575f63f6c
@ -33,6 +33,10 @@ func ParseTags(tags nostr.Tags) IMeta {
|
||||
entry := IMetaEntry{}
|
||||
for _, item := range tag[1:] {
|
||||
div := strings.Index(item, " ")
|
||||
if div == -1 {
|
||||
continue
|
||||
}
|
||||
|
||||
switch item[0:div] {
|
||||
case "url":
|
||||
entry.URL = item[div+1:]
|
||||
|
Loading…
x
Reference in New Issue
Block a user