|
|
7bc0c9 |
diff -up dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/plugins/notify/ext-notify-common.c.CVE_2020_12100ph dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/plugins/notify/ext-notify-common.c
|
|
|
7bc0c9 |
--- dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/plugins/notify/ext-notify-common.c.CVE_2020_12100ph 2019-10-08 10:48:14.000000000 +0200
|
|
|
7bc0c9 |
+++ dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/plugins/notify/ext-notify-common.c 2020-08-07 16:42:56.515389867 +0200
|
|
|
7bc0c9 |
@@ -148,6 +148,7 @@ static int cmd_notify_extract_body_text
|
|
|
7bc0c9 |
const char **body_text_r, size_t *body_size_r)
|
|
|
7bc0c9 |
{
|
|
|
7bc0c9 |
const struct sieve_extension *this_ext = renv->oprtn->ext;
|
|
|
7bc0c9 |
+ const struct message_parser_settings parser_set = { .flags = 0 };
|
|
|
7bc0c9 |
struct ext_notify_message_context *mctx;
|
|
|
7bc0c9 |
struct mail *mail = renv->msgdata->mail;
|
|
|
7bc0c9 |
struct message_parser_ctx *parser;
|
|
|
7bc0c9 |
@@ -181,7 +182,7 @@ static int cmd_notify_extract_body_text
|
|
|
7bc0c9 |
/* Initialize body decoder */
|
|
|
7bc0c9 |
decoder = message_decoder_init(NULL, 0);
|
|
|
7bc0c9 |
|
|
|
7bc0c9 |
- parser = message_parser_init(mctx->pool, input, 0, 0);
|
|
|
7bc0c9 |
+ parser = message_parser_init(mctx->pool, input, &parser_set);
|
|
|
7bc0c9 |
is_text = TRUE;
|
|
|
7bc0c9 |
save_body = FALSE;
|
|
|
7bc0c9 |
while ( (ret=message_parser_parse_next_block(parser, &block)) > 0 ) {
|
|
|
7bc0c9 |
diff -up dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/sieve-message.c.CVE_2020_12100ph dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/sieve-message.c
|
|
|
7bc0c9 |
--- dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/sieve-message.c.CVE_2020_12100ph 2019-10-08 10:48:14.000000000 +0200
|
|
|
7bc0c9 |
+++ dovecot-2.3.8/dovecot-2.3-pigeonhole-0.5.8/src/lib-sieve/sieve-message.c 2020-08-07 16:42:56.516389854 +0200
|
|
|
7bc0c9 |
@@ -1077,10 +1077,10 @@ static int sieve_message_parts_add_missi
|
|
|
7bc0c9 |
struct sieve_message_context *msgctx = renv->msgctx;
|
|
|
7bc0c9 |
pool_t pool = msgctx->context_pool;
|
|
|
7bc0c9 |
struct mail *mail = sieve_message_get_mail(renv->msgctx);
|
|
|
7bc0c9 |
- enum message_parser_flags mparser_flags =
|
|
|
7bc0c9 |
- MESSAGE_PARSER_FLAG_INCLUDE_MULTIPART_BLOCKS;
|
|
|
7bc0c9 |
- enum message_header_parser_flags hparser_flags =
|
|
|
7bc0c9 |
- MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP;
|
|
|
7bc0c9 |
+ struct message_parser_settings parser_set = {
|
|
|
7bc0c9 |
+ .hdr_flags = MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP,
|
|
|
7bc0c9 |
+ .flags = MESSAGE_PARSER_FLAG_INCLUDE_MULTIPART_BLOCKS,
|
|
|
7bc0c9 |
+ };
|
|
|
7bc0c9 |
ARRAY(struct sieve_message_header) headers;
|
|
|
7bc0c9 |
struct sieve_message_part *body_part, *header_part, *last_part;
|
|
|
7bc0c9 |
struct message_parser_ctx *parser;
|
|
|
7bc0c9 |
@@ -1117,7 +1117,7 @@ static int sieve_message_parts_add_missi
|
|
|
7bc0c9 |
if (iter_all) {
|
|
|
7bc0c9 |
t_array_init(&headers, 64);
|
|
|
7bc0c9 |
hdr_content = t_str_new(512);
|
|
|
7bc0c9 |
- hparser_flags |= MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE;
|
|
|
7bc0c9 |
+ parser_set.hdr_flags |= MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE;
|
|
|
7bc0c9 |
} else {
|
|
|
7bc0c9 |
i_zero(&headers);
|
|
|
7bc0c9 |
}
|
|
|
7bc0c9 |
@@ -1129,7 +1129,7 @@ static int sieve_message_parts_add_missi
|
|
|
7bc0c9 |
//parser = message_parser_init_from_parts(parts, input,
|
|
|
7bc0c9 |
// hparser_flags, mparser_flags);
|
|
|
7bc0c9 |
parser = message_parser_init(pool_datastack_create(),
|
|
|
7bc0c9 |
- input, hparser_flags, mparser_flags);
|
|
|
7bc0c9 |
+ input, &parser_set);
|
|
|
7bc0c9 |
while ( (ret=message_parser_parse_next_block
|
|
|
7bc0c9 |
(parser, &block)) > 0 ) {
|
|
|
7bc0c9 |
struct sieve_message_part **body_part_idx;
|