activitypub: ensure Undo request has valid type (#2317)

This commit is contained in:
John Regan
2022-11-21 12:11:41 -08:00
committed by Gabe Kangas
parent f39c1184e5
commit e64dd2d206
+6 -1
View File
@@ -18,7 +18,12 @@ func handleUndoInboxRequest(c context.Context, activity vocab.ActivityStreamsUnd
return err
}
} else {
log.Traceln("Undo", iter.GetType().GetTypeName(), "ignored")
t := iter.GetType()
if t != nil {
log.Traceln("Undo", t.GetTypeName(), "ignored")
} else {
log.Traceln("Undo (no type) ignored")
}
return nil
}
}