summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-07-15 16:13:26 +0200
committerdefault <nobody@localhost>2023-07-15 16:13:26 +0200
commit35987ebb50ae07855d64cef289512b18124494a6 (patch)
treec0ab1036e367ff8804dcb7c8e773277566b8d3b6 /activitypub.c
parentc409d2e260ceb8b1dd21f62459b510d16b30815b (diff)
Avoid incomplete messages in timeline_request().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index 665d54e..f251811 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -166,6 +166,9 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
/* get the id again from the object, as it may be different */
const char *nid = xs_dict_get(object, "id");
+ if (xs_type(nid) != XSTYPE_STRING)
+ return 0;
+
if (wrk && strcmp(nid, *id) != 0) {
snac_debug(snac, 1,
xs_fmt("timeline_request canonical id for %s is %s", *id, nid));