user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* Extra newline when retrieving messages
@ 2020-12-10 20:21 Konstantin Ryabitsev
  2020-12-10 20:55 ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Ryabitsev @ 2020-12-10 20:21 UTC (permalink / raw)
  To: meta

Hello:

While investigating why some of the messages retrieved via 
lore.kernel.org were failing DKIM checks, I realized that 
public-inbox-httpd appends an extra newline to message bodies. This 
newline isn't present in git backends, just in messages retrieved via 
(at least) public-inbox-httpd. 

E.g.:

$ git clone --mirror https://lore.kernel.org/linux-modules/git/0.git
$ cd 0.git
$ git show 8c61c2a9ec6c4737d2da7258a0ff565d87d83d0b:m > /tmp/1
$ curl -s https://lore.kernel.org/linux-modules/20201129164737.135866-1-yauheni.kaliuta@redhat.com/raw > /tmp/2
$ diff -u /tmp/1 /tmp/2
--- /tmp/1      2020-12-10 15:06:15.815341700 -0500
+++ /tmp/2      2020-12-10 15:06:20.647345538 -0500
@@ -1,3 +1,4 @@
+From mboxrd@z Thu Jan  1 00:00:00 1970
 Return-Path: <linux-modules-owner@kernel.org>
 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
        aws-us-west-2-korg-lkml-1.web.codeaurora.org
@@ -56,6 +57,9 @@
 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14
 Precedence: bulk
 List-ID: <linux-modules.vger.kernel.org>
+Archived-At: <https://lore.kernel.org/linux-modules/20201129164737.135866-1-yauheni.kaliuta@redhat.com/>
+List-Archive: <https://lore.kernel.org/linux-modules/>
+List-Post: <mailto:linux-modules@vger.kernel.org>

 The function allocates array but on building it if get_string()
 fails it returns the error leaving the array allocated. The caller
@@ -83,3 +87,4 @@
 --
 2.29.2

+

^^^
This extra newline seems to be present whether a message is retrieved 
via /raw or via /t.mbox.gz. It's benign in almost all cases except when 
the message is signed using DKIM's "simple" mode, in which case it 
causes DKIM signature to no longer verify (as "simple" doesn't do any 
whitespace normalization before hashing body contents).

This appears to be present in the public-inbox version running on 
https://public-inbox.org as well.

Best regards,
-K

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-10 22:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 20:21 Extra newline when retrieving messages Konstantin Ryabitsev
2020-12-10 20:55 ` Eric Wong
2020-12-10 21:43   ` Konstantin Ryabitsev
2020-12-10 22:29     ` Konstantin Ryabitsev
2020-12-10 22:38     ` Eric Wong
2020-12-10 22:41       ` Konstantin Ryabitsev

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.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).