Article View: news.software.nntp
Article #82027Re: Spaces in NNTP commands
From: Julien ÉLIE
Date: Tue, 20 Oct 2009 18:32
Date: Tue, 20 Oct 2009 18:32
104 lines
5510 bytes
5510 bytes
Hi D. Stussy,
> Is a space in a message-ID even a valid character?
>
> A space is not part of the character set allowed by "atext" (from the BNF)
> nor "qtext" (for quoted strings) nor "dtext". Message-ID technically
> relies only on "atext" and "dtext". Therefore, I conclude that spaces are
> NOT allowed in message ID's, even inside a quoted string (if such were
> allowed in a MID).
>
> Although the original news message format borrowed much from RFC 822, I
> have used its current replacement, RFC 5322, for reference. Section 3.6.4
> of 5322 contains the BNF syntax for a message-id field.
According to USEFOR (future RFC 5536), with editorial notes by Charles Lindsey:
3.1.3. Message-ID
The Message-ID header field contains a unique message identifier.
Netnews is more dependent on message identifier uniqueness and fast
comparison than Email is, and some news software and standards
[RFC3977] might have trouble with the full range of possible
<msg-id>s permitted by [RFC5322]. This section therefore restricts
the syntax of <msg-id> as compared to Section 3.6.4 of [RFC5322].
The global uniqueness requirement for <msg-id> in [RFC5322] is to be
understood as applying across all protocols using such message
identifiers, and across both Email and Netnews in particular.
message-id = "Message-ID:" SP *WSP msg-id *WSP CRLF
msg-id = "<" msg-id-core ">"
; maximum length is 250 octets
msg-id-core = id-left "@" id-right
id-left = dot-atom-text
id-right = dot-atom-text / no-fold-literal
no-fold-literal = "[" *mdtext "]"
mdtext = %d33-61 / ; The rest of the US-ASCII
%d63-90 / ; characters not including
%d94-126 ; ">", "[", "]", or "\"
{{EDITORIAL NOTE: <mdtext> replaces <dtext> from RFC 5322 (or you could
simply redefine <dtext>); the effect is to remove ">".}}
The msg-id MUST NOT be more than 250 octets in length.
NOTE: The length restriction ensures that systems that accept
message identifiers as a parameter when referencing an article
(e.g. [RFC3977]) can rely on a bounded length.
Observe that msg-id includes the < and >.
Observe also that in contrast to the corresponding header field in
[RFC5322]:
o The syntax does not allow comments within the Message-ID header
field,
o There is no possibility for ">" to occur inside a <msg-id>.
{{EDITORIAL NOTE: I have removed the bullet about <id-rights>s now being
case-sensitive because I cannot see that they ever were so even in RFC
2822, and if they were then we have done nothing to change that.}}
This is to simplify processing by news servers and to ensure
interoperability with existing implementations and compliance with
[RFC3977]. Moreover, a simple comparison of octets will always suffice
to determine the identity of two <msg-id>s.
Also note that this updated ABNF applies wherever <msg-id> is used,
including the References header field discussed in Section 3.2.10 and
the Supersedes header field discussed in Section 3.2.12.
Some current software may try to match the <id-right> of a <msg-id> in
a case-insensitive fashion; some may match it in a case-sensitive
fashion. Implementations MUST NOT generate a Message-ID where the only
difference from another Message-ID is the case of characters in the
<id-right> part.
When generating a <msg-id>, implementations SHOULD use a domain name
as the <id-right>.
NOTE: Section 3.6.4 of [RFC5322] recommends that the <id-right>
should be a domain name or a domain literal. Domain literals are
troublesome since many IP addresses are not globally unique;
domain names are more likely to generate unique Message-IDs.
> As long as we're dealing with NNTP command parsing, should a PASSWORD or
> USER-ID be permitted to contain a space?
SHOULD, not. But MAY, yes :)
--
Julien ÉLIE
« -- Je t'ai préparé une bonne soupe dont tu me diras des nouvelles, mon garçon !
-- Pour moi, ça, ce n'est pas des bonnes nouvelles ! » (Astérix)
Technical Details
Message-ID:
<hbkvn9$a1t$1@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!not-for-mailReferences:
<hbdap8$7e8$1@news.trigofacile.com> <20091018102618.742$eW@newsreader.com> <hbg3qj$8bf$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <hbkvn9$a1t$1@news.trigofacile.com> Subject: Re: Spaces in NNTP commands Date: Tue, 20 Oct 2009 20:32:03 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hbdap8$7e8$1@news.trigofacile.com> <20091018102618.742$eW@newsreader.com> <hbg3qj$8bf$1@snarked.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.20141118.mbox.gz!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 104 NNTP-Posting-Host: aaubervilliers-151-1-27-37.w83-112.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1256063530 10301 83.112.18.37 (20 Oct 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Tue, 20 Oct 2009 18:32:10 +0000 (UTC) In-Reply-To: <hbg3qj$8bf$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049