9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: theinicke@bss-wf.de, 9front@9front.org
Subject: Re: [9front] [Bug] [PATCH] Mail cannot cope with multi-line header fields
Date: Wed, 09 Sep 2020 12:50:18 -0700	[thread overview]
Message-ID: <94E808D19B9A5E6B039FDEF2737B325A@eigenstate.org> (raw)
In-Reply-To: <9F25A73CBD8CC78F01ECC148912FD5C0@bss-wf.de>

> Having received a mail with line breaks in the subject I have noticed that Mail cannot deal with this. That is the current implementation assumes that each header field resides at a particular line inside the upasfs(4) info file.
> 
> Fixing this bug without touching the info file is probably error-prone, hence I'd like to propose two ways to correct this:
> 
> 1. Replace newline characters with some other character - resulting in a minimal change and not breaking any scripts relying on the interface as it is currently provided
> 
> 2. Add a field name to the entries in info file - then there is no need to make up some arbitrary character for encoding newlines; also this is probably more correct
> 
> Note that plan9port does not suffer from this; this is because each entry in the info file is prefixed with a field name. Given the fact that we are already incompatible to plan9ports upasfs maybe breaking the interface is neglectable.
> 
> Inlined is a patch which prefixes each entry in the info file with a field name and fixes Mail to work with it accordingly. In this first implementation Mail ignores the presence of any additional lines. Thoughts?


Will look at the code in more detail soon, but my first question is what happens when the
subject of a message is something like: 'the subject is\nsubject: blah'? If we're going to
make a breaking change, let's make sure that there's no ambiguity at all -- possibly
prefixing line splits with a space, or quoting the fields.



  reply	other threads:[~2020-09-09 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 19:33 theinicke
2020-09-09 19:50 ` ori [this message]
2020-09-10  6:27   ` [9front] " theinicke
2020-09-10 19:58     ` theinicke
2020-09-10 21:12       ` ori
2020-09-11 21:08         ` theinicke
2020-09-12 21:19           ` theinicke
2020-09-12 22:58           ` ori
2020-09-14 21:49             ` theinicke
2020-09-17 23:01               ` ori

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

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

  git send-email \
    --in-reply-to=94E808D19B9A5E6B039FDEF2737B325A@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    --cc=theinicke@bss-wf.de \
    /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.
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 NNTP newsgroup(s).