You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
3.0 KiB
56 lines
3.0 KiB
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 |
|
--- 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 |
|
+++ 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 |
|
@@ -148,6 +148,7 @@ static int cmd_notify_extract_body_text |
|
const char **body_text_r, size_t *body_size_r) |
|
{ |
|
const struct sieve_extension *this_ext = renv->oprtn->ext; |
|
+ const struct message_parser_settings parser_set = { .flags = 0 }; |
|
struct ext_notify_message_context *mctx; |
|
struct mail *mail = renv->msgdata->mail; |
|
struct message_parser_ctx *parser; |
|
@@ -181,7 +182,7 @@ static int cmd_notify_extract_body_text |
|
/* Initialize body decoder */ |
|
decoder = message_decoder_init(NULL, 0); |
|
|
|
- parser = message_parser_init(mctx->pool, input, 0, 0); |
|
+ parser = message_parser_init(mctx->pool, input, &parser_set); |
|
is_text = TRUE; |
|
save_body = FALSE; |
|
while ( (ret=message_parser_parse_next_block(parser, &block)) > 0 ) { |
|
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 |
|
--- 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 |
|
+++ 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 |
|
@@ -1077,10 +1077,10 @@ static int sieve_message_parts_add_missi |
|
struct sieve_message_context *msgctx = renv->msgctx; |
|
pool_t pool = msgctx->context_pool; |
|
struct mail *mail = sieve_message_get_mail(renv->msgctx); |
|
- enum message_parser_flags mparser_flags = |
|
- MESSAGE_PARSER_FLAG_INCLUDE_MULTIPART_BLOCKS; |
|
- enum message_header_parser_flags hparser_flags = |
|
- MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP; |
|
+ struct message_parser_settings parser_set = { |
|
+ .hdr_flags = MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP, |
|
+ .flags = MESSAGE_PARSER_FLAG_INCLUDE_MULTIPART_BLOCKS, |
|
+ }; |
|
ARRAY(struct sieve_message_header) headers; |
|
struct sieve_message_part *body_part, *header_part, *last_part; |
|
struct message_parser_ctx *parser; |
|
@@ -1117,7 +1117,7 @@ static int sieve_message_parts_add_missi |
|
if (iter_all) { |
|
t_array_init(&headers, 64); |
|
hdr_content = t_str_new(512); |
|
- hparser_flags |= MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE; |
|
+ parser_set.hdr_flags |= MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE; |
|
} else { |
|
i_zero(&headers); |
|
} |
|
@@ -1129,7 +1129,7 @@ static int sieve_message_parts_add_missi |
|
//parser = message_parser_init_from_parts(parts, input, |
|
// hparser_flags, mparser_flags); |
|
parser = message_parser_init(pool_datastack_create(), |
|
- input, hparser_flags, mparser_flags); |
|
+ input, &parser_set); |
|
while ( (ret=message_parser_parse_next_block |
|
(parser, &block)) > 0 ) { |
|
struct sieve_message_part **body_part_idx;
|
|
|