diff options
| author | 2023-07-15 16:13:26 +0200 | |
|---|---|---|
| committer | 2023-07-15 16:13:26 +0200 | |
| commit | 35987ebb50ae07855d64cef289512b18124494a6 (patch) | |
| tree | c0ab1036e367ff8804dcb7c8e773277566b8d3b6 | |
| parent | Merge pull request '[Really optional] Whenever to have Placeholder on some in... (diff) | |
| download | penes-snac2-35987ebb50ae07855d64cef289512b18124494a6.tar.gz penes-snac2-35987ebb50ae07855d64cef289512b18124494a6.tar.xz penes-snac2-35987ebb50ae07855d64cef289512b18124494a6.zip | |
Avoid incomplete messages in timeline_request().
| -rw-r--r-- | activitypub.c | 3 |
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) | |||
| 166 | /* get the id again from the object, as it may be different */ | 166 | /* get the id again from the object, as it may be different */ |
| 167 | const char *nid = xs_dict_get(object, "id"); | 167 | const char *nid = xs_dict_get(object, "id"); |
| 168 | 168 | ||
| 169 | if (xs_type(nid) != XSTYPE_STRING) | ||
| 170 | return 0; | ||
| 171 | |||
| 169 | if (wrk && strcmp(nid, *id) != 0) { | 172 | if (wrk && strcmp(nid, *id) != 0) { |
| 170 | snac_debug(snac, 1, | 173 | snac_debug(snac, 1, |
| 171 | xs_fmt("timeline_request canonical id for %s is %s", *id, nid)); | 174 | xs_fmt("timeline_request canonical id for %s is %s", *id, nid)); |