From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Kahn Gillmor Newsgroups: gmane.emacs.bugs Subject: bug#45631: 27.1; regression: message-forward-ignored-headers no longer applies when forwarding as MIME Date: Tue, 12 Jan 2021 09:57:48 -0500 Message-ID: <87ft36jj83.fsf@fifthhorseman.net> 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> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34004"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , 45631@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 12 21:20:32 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 1kzQ9Y-0008jP-0x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 21:20:32 +0100 Original-Received: from localhost ([::1]:51196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzQ9X-0005Qn-38 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Jan 2021 15:20:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzQ94-00055W-UG for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 15:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzQ94-0001Cr-7n for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 15:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzQ94-0006AQ-2D for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2021 15:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Kahn Gillmor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jan 2021 20:20: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.161048277123664 (code B ref 45631); Tue, 12 Jan 2021 20:20:01 +0000 Original-Received: (at 45631) by debbugs.gnu.org; 12 Jan 2021 20:19:31 +0000 Original-Received: from localhost ([127.0.0.1]:33273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzQ8Y-00069b-Ip for submit@debbugs.gnu.org; Tue, 12 Jan 2021 15:19:30 -0500 Original-Received: from [162.247.75.117] (port=59125 helo=che.mayfirst.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzQ8W-00069T-GA for 45631@debbugs.gnu.org; Tue, 12 Jan 2021 15:19:29 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1610482767; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=gF19veu/YMkCoDkvVN7KRZzlg948UW4RrIaYSU4DUTg=; b=iVKdnPClqCtAdVSlQJTmtJpCILaHGtkzoHQxH4l9FxhrrZFfvt1fqUCJ/S+ZNN2b7RuP1 uM7Eo/kWtl47iJlBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1610482767; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=gF19veu/YMkCoDkvVN7KRZzlg948UW4RrIaYSU4DUTg=; b=YRJQHJjO5jm1hzxAMHs/zSrRoLOZzV31lXf8pTjEnGZnUnLwWXHWRmTUYowbtX3xe+3Jj 29+SCR64KDwnFFW/O4xF1WktbS0gNZGVu2S44iGuZgCv2NRaAemc07Z7Bqwkd/xCr+Fha0L VJL+8oENmkCyVO8uIfZ+VByUvPDSPlXXNMPkyyEnu2EAfMnT3GnCBlKvsFruAwHb7ZRNIAP 9av1l5GljJbugZ0Yq1tTrivi5GK7AbWAvWejy0qgLPhRtfNKL0PmgA4Emq3gG1IW4A3a5HJ a+ZirPFLbH2dmrI/GGPlV5feORw4TCsq0OQzqfPqydm5kn0h8IWKjnLtEhsQ== Original-Received: from fifthhorseman.net (c-24-30-57-93.hsd1.ga.comcast.net [24.30.57.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 58A3DF9A5; Tue, 12 Jan 2021 15:19:27 -0500 (EST) Original-Received: by fifthhorseman.net (Postfix, from userid 1000) id 213D51FE6E; Tue, 12 Jan 2021 09:57:49 -0500 (EST) In-Reply-To: <87czybh5nl.fsf@gnus.org> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQULCQgH AgYVCgkICwIEFgIDAQIeAQIXgAIZARYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJd5Hw3BQkFpJWB AAoJEPIGkReQOOXGDYEA/j0ERjPxDleKMZ2LDcWc/3o5cLFwAVzBKQHppu0Be5IWAP0aeTnyEqlp RTE7M8zugwkhYeUYfYu0BjecDUMnYz6iDLgzBF3kewUWCSsGAQQB2kcPAQEHQK1IuW0GZmcrs2mx CYMl8IHse0tMF8cP7eBNXevrlx2ZiPUEGBYIACYCGwIWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUC XeR7TwUJAiGl/gCBdiAEGRYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCXeR7BQAKCRDEDyVU MvKBD7KmAQCHs+7588C4jto6fMje0Nu97zzoppjJM7lrGF2rVnbHvwD+MgmGUbHzPSUrTWnZBQDi /QM595bxNrBA4N1CiXhs2AMJEPIGkReQOOXGpp0BAM7YeBnt/UNvxJAGm4DidSfHU7RDMWe6Tgux HrH21cDkAQC9leNFXJsQ7F2ZniRPHa8CkictcQEKPL8VCWpfe8LbArg4BF3ke5wSCisGAQQBl1UB BQEBB0Cf+EiAXtntQMf51xpqb6uZ5O0eCLAZtkg0SXHjA1Jl 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:197848 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon 2021-01-11 16:09:18 +0100, Lars Ingebrigtsen wrote: > Well, we'd have to include the relevant headers at a minimum: > > Content-Type: multipart/signed; boundary=3D"=3D-=3D-=3D"; > micalg=3Dpgp-sha256; protocol=3D"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. > But this code is almost a couple of decades old, and I have no idea what > the thought process behind this was at this date. Anybody know? As long as the code doesn't attempt to strip *internal* MIME headers (that is, headers of subparts of the MIME structure) i think it should be safe to apply it to the forwarded message.=20=20 Note also that if we care about breakng cryptographic signatures more generally, DKIM signatures are *more* likely to break if headers are stripped than PGP/MIME or S/MIME, as DKIM is capable of covering headers directly. Even given that concern, i think the most we'd want the "best" setting to do to constrain header stripping would be to compare the stripped version of the file to the non-stripped version -- if the non-stripped version passes DKIM validation, but the stripped does not, then either produce a warning message about DKIM signature breakage or (if in an interactive mode) prompt the user about whether they want to apply the filter or not. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEARYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCX/247AAKCRDEDyVUMvKB D+p/AQDi1rWVeIA3kexFTpM2ZA2WeLdfqwxqqWRoUaghrE3lKAD3ewkT8lfolOnF F3gp8hH6tarCQMApY7Af2rbNc825Bw== =k5eW -----END PGP SIGNATURE----- --=-=-=--