From: markus schnalke Date: Sun, 25 Oct 2015 19:00:50 +0000 (+0100) Subject: DCC contains invisible (not visible) recipients X-Git-Tag: mmh-0.2-RC1~8 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=15378d1b682670191b2a186391398b1e1a285983;ds=sidebyside DCC contains invisible (not visible) recipients Added new test for BCC and DCC headers, which discovered the bug. --- diff --git a/test/tests/spost/test-bcc-dcc b/test/tests/spost/test-bcc-dcc new file mode 100644 index 0000000..cafddaf --- /dev/null +++ b/test/tests/spost/test-bcc-dcc @@ -0,0 +1,145 @@ +# test spost: bcc and dcc headers + +. "$MH_TEST_COMMON" + + +draft="$MH_TEST_DIR/spost-$$.draft" + +profile="$MMH/profile-spost" +cd "$MMH" +cat "`mhparam profile`" - >"$profile" < +! +cd - +export MMHP="$profile" + + +# to + cc headers + +cat >"$draft" < + +foo +----EOM---- +jack +charly +alice +gill +! + + + +# to + bcc headers + +cat >"$draft" < + +foo +----EOM---- +alice +! + + + + + +# only bcc headers + +cat >"$draft" < +Bcc: undisclosed-recipients:; + +foo +----EOM---- +! + + + + +# to + dcc headers + +cat >"$draft" < + +foo +----EOM---- +john +paul +george +ringo +alice +! + + + +# only dcc headers + +cat >"$draft" < +Bcc: undisclosed-recipients:; + +foo +----EOM---- +john +paul +george +ringo +! + diff --git a/test/tests/spost/test-spost b/test/tests/spost/test-sender-header similarity index 100% rename from test/tests/spost/test-spost rename to test/tests/spost/test-sender-header diff --git a/uip/spost.c b/uip/spost.c index 96ca14d..f755a16 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -76,7 +76,7 @@ static struct headers NHeaders[] = { { "Subject", HSUB, 0 }, { "To", HADR|HTRY, MVIS }, { "Cc", HADR|HTRY, MVIS }, - { "Dcc", HADR|HTRY|HDCC, MVIS }, + { "Dcc", HADR|HTRY|HDCC, MINV }, { "Bcc", HADR|HTRY|HBCC, MINV }, { "Message-Id", HBAD, 0 }, { "Fcc", HFCC, 0 }, @@ -92,7 +92,7 @@ static struct headers RHeaders[] = { { "Resent-Subject", HSUB, 0 }, { "Resent-To", HADR|HTRY, MVIS }, { "Resent-Cc", HADR|HTRY, MVIS }, - { "Resent-Dcc", HADR|HTRY|HDCC, MVIS }, + { "Resent-Dcc", HADR|HTRY|HDCC, MINV }, { "Resent-Bcc", HADR|HTRY|HBCC, MINV }, { "Resent-Message-Id", HBAD, 0 }, { "Resent-Fcc", HFCC, 0 },