๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86474

Re: Non-standard 'From' fields

#86474
From: Michael Baeuerle
Date: Sun, 29 Mar 2015 12:07
190 lines
9762 bytes
Adam H. Kerman wrote:
> my name) @gmx.net (my mailbox provider) (Not my full name <michael.baeuerle> wrote:
> > Adam H. Kerman wrote:
> > > Russ Allbery wrote:
> > > > 
> > > > [RFC5536 no longer allows full name in comment]
> > > > Not allowed is a little strong in the sense that it's a syntactically
> > > > valid from header in RFC5536.  It's just that it loses information, since
> > > > the comment is just a comment.
> > > 
> > > There's section 3.2.2 in RFC 5322 on how to structure a comment. The
> > > comment would be retained. Where's the information loss?
> > > 
> > > If it is a name, it's readable by the reader of the Usenet article. We're
> > > not trying to capture information for a database (unless we're an
> > > address harvester).
> > 
> > The content of the comment is no longer defined as "full name" (can
> > contain arbitrary data). The normal purpose of comments are human
> > readable hints at protocol level (not part of the payload). The
> > exception in RFC850 was an abuse of the comment.
> 
> "Abuse of the comment" is nonsense. RFC850 didn't create the practice. It
> inherited it from Mail format and a practice on ARPANET of putting one's
> full name in a comment. It's stated right there in RFC850 why it was done.

Yes, the reason was to formalize a common practice at the time. But it
was only done for USENET, for e-mail it was not formally specified like
this. RFC822 from 1982 only specify an addr-spec or a mailbox (with
full name in angle brackets).

> You know, standards tend to be written to accomodate current practice,
> so that's what happened at the time. With three decades of hindsight,
> golly, maybe RFC850 should have treated it like a comment as is the current
> practice, but it didn't break anything not to treat it like a comment.
> Someone else did the work and second guessing them today isn't helpful.

As I read it (as a too young person to judge) full name in comment was
considered a legacy already at that time. Otherwise I would expect to
find the same exception in RFC822 (on which RFC850 is based).
But there I only find the definition of structured header fields
intended for lexical analysis that evolved to RFC5322. And an example
similar to mine [1].

> But I certainly object to parsing it, then re-writing it. Full name
> in parentheses doesn't break anything, so leave it alone.

If I leave it alone, the RFC5536 parser will ignore it (an older one
too). RFC822 specify:
| 
| [comments] will be ignored by the formal semantics.

RFC5322 specify:
| 
| Runs of FWS, comment, or CFWS that occur between lexical tokens in a
| structured header field are semantically interpreted as a single space
| character.

Therefore a newsreader have 2 options:
a) Use a parser
   Then in the resulting object all information in comments is gone
   if the parser is compliant to current standards
b) Use raw data
   This is no longer an option in the MIME era

If you really consider b), then please take a look at this group:
<news:de.comp.os.unix.linux.misc>
Every second full name and subject contains encoded words. Some of them
base64 encoded. Viewing or citing this in raw mode will create eye
cancer.

> I love your own complete abuse of syntax on From. Folding white space
> before the "@" symbol? Really? Multiple comments in multiple sets of
> parentheses? Nice demonstration of absurdity there.

It was not my idea. Look at the example in RFC822 [1].

And yes, my name is correctly written "Bรคuerle", that means it is
impossible to produce a correct introduction line without at least a
RFC2047 parser from it (if I would use the correct spelling).
The ASCII transcription I currently still use for USENET is only for
better compatibility with legacy software.

> I'm afraid trn4's parser wasn't written to handle cutesy-pie posters
> overwhelming their From headers with that much garbage, so I'm posting this
> followup with a mal-formed attribution line.

It was only for demonstration what is legal, nobody use it like this
in real world. But everyone use MIME in the non-english speaking
world. And a standard compliant parser have to understand both.

> > > [...]
> > > What if it really was a comment?
> > > 
> > > I don't see any harm to Usenet or any benefit to the author in
> > > making assumptions and translating into a different format.
> > 
> > There are no assumptions required.
> 
> There is an assumption required, which is what is being discussed: The
> author is using deprecated syntax to state his full name and isn't making
> a comment.

This is what my converter is designed to detect and handle.
 
> You have just demonstrated why making such assumptions are unsafe, because
> some author deliberately trying to break parsing whilst trying to claim
> that what he's put on From isn't nonstandard, when clearly, he violated
> a SHOULD NOT without having a valid reason to do so. (I'll take your word
> for it that you're violating a SHOULD NOT; didn't bother to check.)

You SHOULD NOT send such things. But a parser nevertheless MUST
understand them (as long as the syntax is correct).

Remember the robustness principle:
- Be conservative in what you send
- Be liberal in what you accept

An example for the first point is my name in ASCII transcription (avoid
MIME syntax even if allowed). An example for the second is my RFC850
converter (accept any correct RFC5536 syntax if possible and some legacy
from RFC850 too that will improve compatibility).

> > The current format can be identified via the angle brackets of the
> > address. If there are no angle brackets, there can be no full name.
> 
> We're not discussing that, are we. We're discussing whether it's safe to
> make assumptions about what's in parentheses and whether to assume the
> deprecated format was used.

That is exactly what my RFC850 converter is used for: Make legacy things
work together with the more strict RFC5536 parser.
 
> > Guessing the meaning of the undefined content in comments will require
> > assumtions instead.
> 
> Making that assumption would contradict your statement, quoted above,
> that there are no assumptions required.

Look at where the guessing is done: In the converter, not in the parser.
Removing the converter (some time in the future) will reject the legacy
syntax.

> > Therefore a standard compliant RFC5536 parser should find no "full name"
> > in an address with RFC850 format.
> 
> > My converter explicitly declares the content of the comment as the
> > "full name" and feed the result of this declaration into the parser
> > (that otherwise would detect the mailbox-list only).
> 
> There's no reason to do anything with it. There's no reason to parse it
> for the deprecated format. Just leave it be. It won't break anything if
> left alone, so leave it be. Leave it to the reader to decide for himself
> if it's a full name or a comment.

Again, in the MIME era it is *really* no longer an option for an
international newsreader to use any header field raw and unparsed,
neither for display not for citation (see above).

For e-mail it is even worse. Every second message require a recursive
MIME multipart parser today (because of nested mutipart content).

> > Note that the mailbox-list itself is allowed to contain comments and
> > folding:
> > | 
> > | From: some.name (not my name)
> > |  @domain.invalid (registered by me)
> > |  (Full name) (garbage)
> 
> > should be valid syntax according to RFC5322. It is noted that you
> > "SHOULD NOT" send such things, but the parser of the recipient must
> > understand them (should report the mailbox "some.name@domain.invalid"
> > and no "full name" in this case)
> 
> > I will try to manually edit the "From:" header field of this article for
> > demonstration.
> 
> Dear gawd. Why do you take it upon yourself to waste the time
> of programmers who are trying their best NOT to break things?
> No one should have to write a parser to accomodate this nonsense.

I don't agree. It is valid syntax and therefore *every* parser should
understand it (MUST understand it in the strict sense of the standards).

What everybody should do is to avoid producing such things in output if
possible (send information in the legal format most simple and
compatible).

_____________
[1] http://tools.ietf.org/html/rfc822#section-3.1.4
Technical Details
Message-ID: <AABVF9BeiDcAAEWY.A1.flnews@WStation4.micha.freeshell.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!u14no1194012lbd.1!news-out.google.com!vt8ni17542lbb.0!nntp.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <ukdvda99imjm7ba0j7o4u8hem7e8p79nbr@4ax.com> <87y4mikrxa.fsf@hope.eyrie.org> <mf5f0h$51o$4@news.albasani.net> <AABVFoWdZC0AAErI.A1.flnews@WStation4.micha.freeshell.org> <mf6lvb$hs5$1@news.albasani.net>

Show Full Headers
Complete Article Headers
Message-ID: <AABVF9BeiDcAAEWY.A1.flnews@WStation4.micha.freeshell.org>
Subject: Re: Non-standard 'From' fields
Date: Sun, 29 Mar 2015 12:07:25 +0000
From: Michael Baeuerle <michael.baeuerle@gmx.net>
References: <ukdvda99imjm7ba0j7o4u8hem7e8p79nbr@4ax.com> <87y4mikrxa.fsf@hope.eyrie.org> <mf5f0h$51o$4@news.albasani.net> <AABVFoWdZC0AAErI.A1.flnews@WStation4.micha.freeshell.org> <mf6lvb$hs5$1@news.albasani.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!u14no1194012lbd.1!news-out.google.com!vt8ni17542lbb.0!nntp.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
X-Received: by 10.112.97.37 with SMTP id dx5mr6838231lbb.16.1427630886042;
Newsgroups: news.software.nntp
Lines: 190
Mime-Version: 1.0
X-Trace: individual.net JiCrYULQQY0lEMNno50JAgan2zS5EDtEJo+DKu6M9oN0jNWzJ6
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:m2ZPYWbFIaNDUSuLk+hr2nLrkxk=
Injection-Date: 29 Mar 2015 12:07:25 -0000
User-Agent: flnews/0.10 (for AIX)
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit