diff options
| author | grunfink <grunfink@comam.es> | 2026-09-02 10:25:43 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-09-02 10:25:43 +0200 |
| commit | 7bf914ba1cb9b3bf4b24e142aa329e0bd71f2d80 (patch) | |
| tree | f9c2117f7f8e6711af0af1842a7a1518b59cbb02 | |
| parent | e7db1c7175631ca6bf77b63cb117da51a046db69 (diff) | |
Fixed previous commit.
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 7687013..af009ae 100644 --- a/activitypub.c +++ b/activitypub.c @@ -82,9 +82,6 @@ int activitypub_request(snac *user, const char *url, xs_dict **data) NULL, NULL, 0, &status, &payload, &p_size, 0); } - if (p_size >= 100000) - return HTTP_STATUS_BAD_REQUEST; - if (status == 0 || (status >= 500 && status <= 599)) { /* I found an instance running Misskey that returned 500 on signed messages but returned the object @@ -99,6 +96,9 @@ int activitypub_request(snac *user, const char *url, xs_dict **data) NULL, 0, &status, &payload, &p_size, 0); } + if (p_size >= 100000) + return HTTP_STATUS_BAD_REQUEST; + if (valid_status(status)) { /* ensure it's ActivityPub data */ ctype = xs_dict_get(response, "content-type"); |