From: Simon Josefsson <jas@extundo.com>
Cc: Dave Love <d.love@dl.ac.uk>, bugs@gnus.org, bug-gnu-emacs@gnu.org
Subject: Re: bad rfc2047 encoding
Date: Wed, 21 Aug 2002 19:14:48 +0200 [thread overview]
Message-ID: <ilu3ct8nng7.fsf@latte.josefsson.org> (raw)
In-Reply-To: <hvofbxtmpd.fsf@rasputin.ws.nextra.no> (Bjørn Mork's message of "Tue, 20 Aug 2002 20:22:06 +0200")
Bjørn Mork <bmork@dod.no> writes:
> And
>
> (with-temp-buffer
> (insert "To: <Kai.Großjohann@CS.Uni-Dortmund.DE>")
> (rfc2047-encode-message-header)
> (buffer-string))
>
> evaluates to
>
> "To: <Kai.=?iso-8859-1?q?Gro=DFjohann?=@CS.Uni-Dortmund.DE>"
>
> OK, it's an illegal local part, but still... such local parts _do_
> exist. Gnus is handling this in an ugly and non-compliant way IMHO.
> RFC2047 says: "An 'encoded-word' MUST NOT appear in any portion of an
> 'addr-spec'." It does not say that an illegal local part cancels this
> requirement.
>
> I agree with Dave that the headers should be parsed to ensure that
> only comments, text and words within phrases are encoded. Other parts
> of the headers should never be encoded no matter which characters they
> contain. Gnus should instead probably warn the user about the illegal
> header content.
>
> Another example where Gnus fails:
>
> (with-temp-buffer
> (insert "From: \"Bjørn Mork\" <bmork@dod.no>")
> (rfc2047-encode-message-header)
> (buffer-string))
> "From: \"=?iso-8859-1?q?Bj=F8rn?= Mork\" <bmork@dod.no>"
>
> RFC2047:
> "An 'encoded-word' MUST NOT appear within a 'quoted-string'."
Yup, I now agree parsing the header is required. RFC 2047 is only to
be used in some parts of the header. I wonder if rfc822.el is up to
this though, I remember it didn't cope with non-ASCII properly at all.
Anyone want to work on it?
> In this example the quoted-string should probably be unquoted and
> then encoded. Or would that break something?
It could perhaps encode the quotes too.
next prev parent reply other threads:[~2002-08-21 17:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-15 22:00 bad rfc2047 encoding Dave Love
[not found] ` <ilu8z36li3m.fsf@latte.josefsson.org>
2002-08-20 17:02 ` Dave Love
2002-08-20 17:22 ` Simon Josefsson
2002-08-21 16:54 ` Dave Love
2002-08-21 17:06 ` Simon Josefsson
2002-08-21 17:40 ` Reiner Steib
2002-08-22 11:47 ` Dave Love
2002-08-22 17:48 ` Simon Josefsson
2002-08-30 18:08 ` Dave Love
[not found] ` <hvofbxtmpd.fsf@rasputin.ws.nextra.no>
2002-08-21 17:14 ` Simon Josefsson [this message]
2002-08-22 12:20 ` Dave Love
[not found] ` <rzq4rdncdta.fsf@albion.dl.ac.uk>
2002-08-22 13:50 ` Bjørn Mork
2002-08-30 17:59 ` Dave Love
2002-08-22 17:55 ` Simon Josefsson
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://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ilu3ct8nng7.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=bugs@gnus.org \
--cc=d.love@dl.ac.uk \
/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://git.savannah.gnu.org/cgit/emacs.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).