aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrunfink <grunfink@comam.es>2026-09-02 10:23:24 +0200
committergrunfink <grunfink@comam.es>2026-09-02 10:23:24 +0200
commite7db1c7175631ca6bf77b63cb117da51a046db69 (patch)
tree6fe0a688130c412cbeffd4b10eeac5343f577bac
parent14db95ed9900f238ec9036d2fea9c0ad1be3ad41 (diff)
Also drop too big messages in activitypub_request().
-rw-r--r--activitypub.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index c148812..7687013 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -82,6 +82,9 @@ 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