commit 35987eb

default  ·  2023-07-15 14:13:26 +0000 UTC
parent c409d2e
Avoid incomplete messages in timeline_request().
1 files changed,  +3, -0
+3, -0
 1@@ -166,6 +166,9 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
 2                 /* get the id again from the object, as it may be different */
 3                 const char *nid = xs_dict_get(object, "id");
 4 
 5+                if (xs_type(nid) != XSTYPE_STRING)
 6+                    return 0;
 7+
 8                 if (wrk && strcmp(nid, *id) != 0) {
 9                     snac_debug(snac, 1,
10                         xs_fmt("timeline_request canonical id for %s is %s", *id, nid));