commit 7bf914b

grunfink  ·  2026-09-02 08:25:43 +0000 UTC
parent e7db1c7
Fixed previous commit.
1 files changed,  +3, -3
+3, -3
 1@@ -82,9 +82,6 @@ int activitypub_request(snac *user, const char *url, xs_dict **data)
 2             NULL, NULL, 0, &status, &payload, &p_size, 0);
 3     }
 4 
 5-    if (p_size >= 100000)
 6-        return HTTP_STATUS_BAD_REQUEST;
 7-
 8     if (status == 0 || (status >= 500 && status <= 599)) {
 9         /* I found an instance running Misskey that returned
10            500 on signed messages but returned the object
11@@ -99,6 +96,9 @@ int activitypub_request(snac *user, const char *url, xs_dict **data)
12             NULL, 0, &status, &payload, &p_size, 0);
13     }
14 
15+    if (p_size >= 100000)
16+        return HTTP_STATUS_BAD_REQUEST;
17+
18     if (valid_status(status)) {
19         /* ensure it's ActivityPub data */
20         ctype = xs_dict_get(response, "content-type");