commit adf5623
default
·
2024-01-11 19:20:01 +0000 UTC
parent 4f7a138
Avoid invalid actors in mastoapi_status().
1 files changed,
+4,
-0
+4,
-0
1@@ -706,6 +706,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg)
2 const char *type = xs_dict_get(msg, "type");
3 const char *id = xs_dict_get(msg, "id");
4
5+ /* fail if it's not a valid actor */
6+ if (xs_is_null(type) || xs_is_null(id))
7+ return NULL;
8+
9 xs *acct = mastoapi_account(actor);
10
11 xs *idx = NULL;