user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org
Subject: Re: Extra newline when retrieving messages
Date: Thu, 10 Dec 2020 16:43:29 -0500	[thread overview]
Message-ID: <20201210214329.do66z6gzvepxc5w3@chatter.i7.local> (raw)
In-Reply-To: <20201210205540.GA10371@dcvr>

On Thu, Dec 10, 2020 at 08:55:40PM +0000, Eric Wong wrote:
> Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> > 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. 
> 
> It looks like a regression from commit dbdc7a42dd885523 (2016-04-11);
> which now doesn't make sense, though very little is making sense
> to me nowadays :<

Actually, my conclusions were wrong and the problem is not with the 
newline -- it's the extra inserted headers. So you're not the only 
person confused here. :)

The message that tripped me up is this one:

https://lore.kernel.org/alsa-devel/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com/raw

The DKIM signature in that message is:

DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org;
	s=default; t=1607605851;
	bh=RloCOZ1mS9qShbBGvPnUerOnMg14SHidcYi1OxvdtE0=;
	h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive:
	 List-Post:List-Help:List-Subscribe:From;
	b=nBOdKYbMY44uVJMlw++UIMx03JWn334I/F5uyH5hmhU9h9/cFQTfZL0WAwPzzG7nL
	 pT9M4ElwsSqu8isrhJd7QV8q8DNvu+cRmGKbGOVLIEMhlYU87iHvIATKQmchLQv3xR
	 OixHf1955oAoTFU/n5eqjaZdLhyfUtSo5oCdxg7Y=

The problem here is that List-Archive is included in the list of signed 
headers, but when we retrieve the message via lore.kernel.org, it 
inserts an additional couple of headers:

Archived-At: <https://lore.kernel.org/alsa-devel/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com/>
List-Archive: <https://lore.kernel.org/alsa-devel/>

This is what causes DKIM verification to fail, and NOT the newline:

$ curl -s \
  https://lore.kernel.org/alsa-devel/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com/raw \
  | dkimverify
signature verification failed

$ curl -s \
  https://lore.kernel.org/alsa-devel/20201210152541.191728-1-amadeuszx.slawinski@linux.intel.com/raw \
  | grep -v '<https://lore' | dkimverify
signature ok

So, I was confused as well and there is no need to fix the newline.

That said, should public-inbox consider this case when generating the 
/raw and /t.mbox.gz messages? If the Archived-At and List-Archive 
headers are listed in the DKIM-Signature header, skip inserting them 
into the generated message?

-K

  reply	other threads:[~2020-12-10 21:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-12-10 22:29     ` Konstantin Ryabitsev
2020-12-10 22:38     ` Eric Wong
2020-12-10 22:41       ` Konstantin Ryabitsev

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://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20201210214329.do66z6gzvepxc5w3@chatter.i7.local \
    --to=konstantin@linuxfoundation.org \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    /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://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).