diff options
| author | 2024-01-11 20:20:01 +0100 | |
|---|---|---|
| committer | 2024-01-11 20:20:01 +0100 | |
| commit | adf5623044f7dcd84edb8345595a1bda651e5cbb (patch) | |
| tree | ecbc582d86fd509ecf92c770435a8eaaa2762c22 | |
| parent | Better checking for CC creation in msg_note(). (diff) | |
| download | snac2-adf5623044f7dcd84edb8345595a1bda651e5cbb.tar.gz snac2-adf5623044f7dcd84edb8345595a1bda651e5cbb.tar.xz snac2-adf5623044f7dcd84edb8345595a1bda651e5cbb.zip | |
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) | |||
| 706 | const char *type = xs_dict_get(msg, "type"); | 706 | const char *type = xs_dict_get(msg, "type"); |
| 707 | const char *id = xs_dict_get(msg, "id"); | 707 | const char *id = xs_dict_get(msg, "id"); |
| 708 | 708 | ||
| 709 | /* fail if it's not a valid actor */ | ||
| 710 | if (xs_is_null(type) || xs_is_null(id)) | ||
| 711 | return NULL; | ||
| 712 | |||
| 709 | xs *acct = mastoapi_account(actor); | 713 | xs *acct = mastoapi_account(actor); |
| 710 | 714 | ||
| 711 | xs *idx = NULL; | 715 | xs *idx = NULL; |