unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Cc: Robert Pluim <rpluim@gmail.com>, 45631@debbugs.gnu.org
Subject: bug#45631: 27.1; regression: message-forward-ignored-headers no longer applies when forwarding as MIME
Date: Mon, 18 Jan 2021 16:50:10 +0100	[thread overview]
Message-ID: <878s8qxn0t.fsf@gnus.org> (raw)
In-Reply-To: <87ft36jj83.fsf@fifthhorseman.net> (Daniel Kahn Gillmor's message of "Tue, 12 Jan 2021 09:57:48 -0500")

Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:

>>   Content-Type: multipart/signed; boundary="=-=-=";
>> 	micalg=pgp-sha256; protocol="application/pgp-signature"
>
> I agree, but if the user is stripping the Content-Type header, i think
> they're going to break a lot more than digital signatures or encryption
> (imagine what that does to a multipart/alternative message).  I think
> that stripping Content-Type is more of a case of "don't do that, then".
> Maybe we even want to warn if the user tries to strip any of the
> Content-* headers more generally.

This is bringing back memories...

When forwarding messages, we have three cases:

1) Forward as non-MIME

Heeding message-forward-included-headers is unproblematic here: The
recipient isn't going to be able to reconstruct the original message at
all, since none of the MIME headers (and stuff) is included in
`message-forward-included-headers'.  This basically means that the
recipient can just read the text itself.

2) MIME, but `message-forward-show-mml'

We can also remove all the headers here, because Message will
reconstruct all the MIME headers needed for the recipient to reconstruct
the entire original message, with multipart bits and all.

3) MIME, but not `message-forward-show-mml'

We don't remove any headers, because we don't know which ones are needed
for the recipient to actually read the resulting nested message.
Certainly not based on `message-forward-included-headers' -- this just
leaves From/Subject/etc.

So...  I think what message was doing before my last change was correct,
but insufficiently documented: If we have `message-forward-as-mime', but
not `message-forward-show-mml', then we can't remove headers based on
`message-forward-included-headers', because the resulting message will
be invalid.

If headers are to be removed in 3), then we have to come up with a
`message-forward-headers-not-removed-when-using-mime-but-not-mml' (phew)
variable, that contains the headers necessary for reconstructing the
resulting message.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2021-01-18 15:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03 17:12 bug#45631: 27.1; regression: message-forward-ignored-headers no longer applies when forwarding as MIME Daniel Kahn Gillmor
2021-01-05 13:06 ` Robert Pluim
2021-01-05 23:25   ` Daniel Kahn Gillmor
2021-01-06 10:31     ` Robert Pluim
2021-01-10 15:18       ` Lars Ingebrigtsen
2021-01-10 17:25         ` Eli Zaretskii
2021-01-11 15:04           ` Lars Ingebrigtsen
2021-01-10 21:41         ` Daniel Kahn Gillmor
2021-01-11 15:09           ` Lars Ingebrigtsen
2021-01-12 14:57             ` Daniel Kahn Gillmor
2021-01-13  9:25               ` Robert Pluim
2021-01-13 17:35                 ` Daniel Kahn Gillmor
2021-01-18 15:50               ` Lars Ingebrigtsen [this message]
2021-01-18 17:43                 ` Daniel Kahn Gillmor
2021-01-19  3:12                   ` Lars Ingebrigtsen
2021-01-19 16:19                     ` Daniel Kahn Gillmor
2021-01-20 16:17                       ` Lars Ingebrigtsen
2021-01-20 19:31                         ` Daniel Kahn Gillmor
2021-01-21 15:46                           ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878s8qxn0t.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=45631@debbugs.gnu.org \
    --cc=dkg@fifthhorseman.net \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).