nip92: fix imeta parsing to guard against invalid tags.

This commit is contained in:
fiatjaf 2025-03-10 02:34:17 -03:00
parent c15904ba7b
commit f575f63f6c

View File

@ -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:]