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

This commit is contained in:
John Regan 2022-11-11 14:13:55 -05:00 committed by Gabe Kangas
parent f39c1184e5
commit e64dd2d206
No known key found for this signature in database
GPG Key ID: 4345B2060657F330

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
}
}