From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs 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 Message-ID: <878s8qxn0t.fsf@gnus.org> References: <87mtxq7xmd.fsf@fifthhorseman.net> <87y2h71qj5.fsf@gmail.com> <87mtxn6k69.fsf@fifthhorseman.net> <878s961hmq.fsf@gmail.com> <87mtxgq0qo.fsf@gnus.org> <87ft385v27.fsf@fifthhorseman.net> <87czybh5nl.fsf@gnus.org> <87ft36jj83.fsf@fifthhorseman.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3491"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Robert Pluim , 45631@debbugs.gnu.org To: Daniel Kahn Gillmor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 18 16:52:00 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1Woy-0000mG-98 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 16:52:00 +0100 Original-Received: from localhost ([::1]:35562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Wox-0003Ee-7U for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 10:51:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Wo6-0002lb-Na for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 10:51:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1Wo1-0001Nt-LU for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 10:51:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1Wo1-0001It-J9 for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2021 10:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2021 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 45631-submit@debbugs.gnu.org id=B45631.16109850244955 (code B ref 45631); Mon, 18 Jan 2021 15:51:01 +0000 Original-Received: (at 45631) by debbugs.gnu.org; 18 Jan 2021 15:50:24 +0000 Original-Received: from localhost ([127.0.0.1]:47967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1WnP-0001Hp-U5 for submit@debbugs.gnu.org; Mon, 18 Jan 2021 10:50:24 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:47628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1WnO-0001HV-4j for 45631@debbugs.gnu.org; Mon, 18 Jan 2021 10:50:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AJoTOF4SQOKYBzS/XGlNhInkK3U1yXtCcO1YBeF+EZE=; b=etZ8mgB7Jj92D6hV0/tunj7/d0 B5cbnsSVRD3UWhTwkMSTZBaO/1gGculoH3y5wFyAINUYhCVoyqlNGDIRjZUmec3XKZ9+i27oQvItB S+aTDDlE8ECZMrEYb1o7X7GVc8Ixil2kXrcEZW1R3bj8knL5CeYBWn0esfjjyI7DvS6w=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1WnD-0004C8-HT; Mon, 18 Jan 2021 16:50:14 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWYX16GWlrXyL7/ //9u4OxpAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UBEg8iAZbEp74AAAGGSURBVCjPPZHBattAEIZn hRWoTq6Ie/ApFAphnkIJOfkkjMYUnXps9RSycUrYUxHJxaeVcMzqf8rOyEoEy+ynf/bfnRkiopWU jn4yoHtKpSLa4APKwv2awUn65H6oRAU5J9vzohWFilwh3C/om8JXSssaozp4hQeRBuPScQZalkth jAXFLcinRAZJuAUhFApxwW0KindPB31JDrcxKFSAfynZIPO4NBr0npgioFsHoG8ofGnAr2sg0obC /QaH56YDpTWFZI3Qc76XiomyDuCXf2QGlF2sLI+pOH4HzsdE9xe64xF4/n1ok9NAAyIjfcwPf7sT 6W3Ze0FAWNUUAR/shBmArxs/wfzFP67+BIyioIcw6NqLpsXBwOe4MYiDisPRpjClmYHjq1vQpkep QI39TeD9SrtTGyzhu7Oe2QJHLd+/2gt2Wg3axL/ZsHRGe27Zv+0M1OE72LeWJipf5ueRbCe4NkR2 FthP9Yg6oOfTVTGHPa9nUIf+vp5hih/K5JDPUFm0O/EfFb0JCzV+bpUAAAAldEVYdGRhdGU6Y3Jl YXRlADIwMjEtMDEtMThUMTU6MzQ6MDErMDA6MDCOvUnMAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIx LTAxLTE4VDE1OjM0OjAxKzAwOjAw/+DxcAAAAABJRU5ErkJggg== X-Now-Playing: Sina Bakare's _Nigeria 70 (No Wahala: Highlife, Afro-Funk & Juju 1973-1987)_: "Africa" In-Reply-To: <87ft36jj83.fsf@fifthhorseman.net> (Daniel Kahn Gillmor's message of "Tue, 12 Jan 2021 09:57:48 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198083 Archived-At: Daniel Kahn Gillmor 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