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 GitHub
parent deaa8ce62d
commit 9978882b6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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