From: Nic Ferrier <nferrier@tapsellferrier.co.uk>
Cc: emacs-devel@gnu.org, rms@gnu.org, bugs@gnus.org
Subject: Re: base64 behavior is not MIME compliant
Date: Tue, 05 Jul 2005 23:10:33 +0100 [thread overview]
Message-ID: <87wto4j44m.fsf@kanga.tapsellferrier.co.uk> (raw)
In-Reply-To: <k9oe9hey17.fsf@ayer.connecterra.net> (Marc Horowitz's message of "Tue, 05 Jul 2005 17:35:48 -0400")
Marc Horowitz <marc@mit.edu> writes:
> "Richard M. Stallman" <rms@gnu.org> writes:
>
>>> I received a piece of email which passed through an older MTA. This
>>> MTA inserted a ! and a newline after every 1000 characters of a very
>>> long line of base64-encoded data, which used to be common behavior.
>>> When Gnus tried to display this email, it failed, because the !
>>> characters were not recognized as valid base64 encoding.
>>
>>> Maybe I misunderstood what you were asking for. I thought you
>>> were asking us to make additional base64-decode-region signal
>>> errors in cases where currently it does not. But now it looks
>>> like you are asking for it to accept input that now gives
>>> an error.
>
> I'm sorry I was confusing. To quote my earlier email:
>
> I believe the best fix is for base64-decode-region to take an optional
> argument which specifies how liberal it should be about it's input,
> defaulting to the current behavior, and for Gnus to use this argument.
>
> Defaulting to the current behavior should certainly not mean
> signalling errors in new cases. You are correct that I'm asking for a
> behavior variant which would result in more input being accepted. If
> this variant became the default, I would not object, but I would
> certainly understand if you did not want to change the default
> behavior.
>
>>> Could you give a self-contained description of the change that you are
>>> requesting in the behavior of this function?
>
> For the purposes of reading mail, it is valuable to ignore all
> characters not part of the base64 character set when decoding. So, my
> minimum proposal would be for base64-decode-region to ignore all
> unknown characters, instead of signalling errors in this case.
>
> It would be more generally useful to provide three forms of the
> base64-decode-region function, either by having three functions, or
> one with an optional argument:
>
> Form 1: all characters not part of the base64 character set would
> be ignored.
>
> Form 2: any character not part of the base64 character set would
> cause an error to be signalled.
>
> Form 3: any character not part of the union of the base64
> character set and the whitespace characters would cause an error
> to be signalled.
>
> Form 3 is the current observed behavior. I believe there is a need
> for Form 1, to make mail reading work more smoothly. Form 2 mainly
> exists for completeness.
Why can't you just pre-parse the data parsed to the base64 decoder? I
believe that's the correct behaviour. A base64 decoder should decode
base64, not "base64 but also it does this extra trick if you wave your
hand in the air"
Nic
next prev parent reply other threads:[~2005-07-05 22:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <t53zmt4dce3.fsf@central-air-conditioning.toybox.cambridge.ma.us>
2005-07-03 20:43 ` base64 behavior is not MIME compliant Richard M. Stallman
2005-07-03 21:09 ` Nic Ferrier
2005-07-04 4:59 ` Marc Horowitz
2005-07-05 4:35 ` Richard M. Stallman
2005-07-05 21:35 ` Marc Horowitz
2005-07-05 22:10 ` Nic Ferrier [this message]
2005-07-05 23:55 ` Marc Horowitz
2005-07-06 1:06 ` Nic Ferrier
2005-07-06 1:15 ` Ken Raeburn
2005-07-06 1:48 ` Nic Ferrier
2005-07-05 22:52 ` Arne Jørgensen
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=87wto4j44m.fsf@kanga.tapsellferrier.co.uk \
--to=nferrier@tapsellferrier.co.uk \
--cc=bugs@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.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://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).