From d38a20f82f8e83d87c9e43fede78adb896138374 Mon Sep 17 00:00:00 2001 From: Patrick Cernko Date: Tue, 1 Sep 2026 18:01:30 +0200 Subject: [PATCH] doveadm-http: increase max_string_size for json parser as json can contain whole sieve scripts as a string, increase the (default) max allowed string size for sieve scripts --- src/doveadm/client-connection-http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index 848bce751d..9a4436f3d3 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -663,10 +663,13 @@ doveadm_http_server_read_request_v1(struct client_request_http *req) struct http_server_request *http_sreq = req->http_request; const char *error; int ret; + const struct json_limits limits = { + .max_string_size = 1024*1024U, + }; if (req->json_input == NULL) { req->json_input = json_istream_create_array( - req->input, NULL, JSON_PARSER_FLAG_NUMBERS_AS_STRING); + req->input, &limits, JSON_PARSER_FLAG_NUMBERS_AS_STRING); } if (req->json_output == NULL) {