]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: http_request_parser_init() - Use the max_target_length from limits
authorMarkus Valentin <markus.valentin@open-xchange.com>
Tue, 6 Feb 2024 15:17:44 +0000 (16:17 +0100)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:12 +0000 (12:34 +0200)
parser->max_target_length was always set to the
HTTP_REQUEST_DEFAULT_MAX_TARGET_LENGTH. Now it can be also set via
passing into http_request_parser_init() using the http_request_limits.

src/lib-http/http-request-parser.c

index 77869e6a46ee227e3fe3d8470e03b932c0829078..a38b6062bb89c6c3046137b4011681d044e46781 100644 (file)
@@ -64,9 +64,11 @@ http_request_parser_init(struct istream *input,
        if (limits != NULL) {
                hdr_limits = limits->header;
                max_payload_size = limits->max_payload_size;
+               parser->max_target_length = limits->max_target_length;
        } else {
                i_zero(&hdr_limits);
                max_payload_size = 0;
+               parser->max_target_length = 0;
        }
 
        /* substitute default limits */