diff options
author | default <nobody@localhost> | 2024-01-11 20:20:01 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-11 20:20:01 +0100 |
commit | adf5623044f7dcd84edb8345595a1bda651e5cbb (patch) | |
tree | ecbc582d86fd509ecf92c770435a8eaaa2762c22 | |
parent | 4f7a13884e9ab16003765e1b01b272a939b5899a (diff) |
Avoid invalid actors in mastoapi_status().
-rw-r--r-- | mastoapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -706,6 +706,10 @@ xs_dict *mastoapi_status(snac *snac, const xs_dict *msg) const char *type = xs_dict_get(msg, "type"); const char *id = xs_dict_get(msg, "id"); + /* fail if it's not a valid actor */ + if (xs_is_null(type) || xs_is_null(id)) + return NULL; + xs *acct = mastoapi_account(actor); xs *idx = NULL; |