Thread View: news.software.nntp
3 messages
3 total messages
Started by Julien ÉLIE
Sat, 24 Sep 2016 20:45
Case-sensitive SASL mechanisms and compression algorithms?
Author: Julien ÉLIE
Date: Sat, 24 Sep 2016 20:45
Date: Sat, 24 Sep 2016 20:45
43 lines
2420 bytes
2420 bytes
Hi,
I've just discovered that SASL mechanisms are supposed to be case-sensitive.
Indeed, according to RFC 4643:
authinfo-sasl-command = "AUTHINFO" WS "SASL" WS mechanism
[WS initial-response]
mechanism = 1*20mech-char
mech-char = UPPER / DIGIT / "-" / "_"
UPPER = %x41-5A
DIGIT = %x30-39
Which means that only upper-case letters are allowed (A-Z).
It is coherent with the SASL mechanisms registry:
http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml
"SASL mechanisms are named by strings, from 1 to 20 characters in
length, consisting of upper-case letters, digits, hyphens, and/or
underscores. SASL mechanism names must be registered with the IANA."
So, an NNTP command like "AUthinFO SasL digEST-md5" is supposed to
return 501 (invalid syntax) whereas "AUthinFO SasL DIGEST-MD5" is fine.
What should we do for NNTP compression algorithms?
As we'll create a specific registry for NNTP, should we also enforce
case sensitivity? That is to say "COMprEss deFLAte" is not valid,
whereas "COMprEss DEFLATE" is?
Any thoughts about that?
--
Julien ÉLIE
« Un voyage de mille lieues commence toujours par un premier pas. »
(Lao Zi)
Re: Case-sensitive SASL mechanisms and compression algorithms?
Author: Michael Bäuerle
Date: Mon, 26 Sep 2016 10:29
Date: Mon, 26 Sep 2016 10:29
25 lines
1984 bytes
1984 bytes
Julien ÉLIE wrote: > > [...] > What should we do for NNTP compression algorithms? > As we'll create a specific registry for NNTP, should we also enforce > case sensitivity? That is to say "COMprEss deFLAte" is not valid, > whereas "COMprEss DEFLATE" is? > > Any thoughts about that? In general: Case insensitive definitions require an additional processing step for the parser on the receiving side. And on the sending side I see no advantage too: A command or other protocol keyword is implemented into the programs (and nothing that a user will enter via keyboard - with potentially wrong case). For the NNTP protocol: The commands itself are case insensitive, so it may look inconsequent to define the compression algorithms case sensitive. I'm not sure what is the better option. Personally I would vote for defining it the SASL way (case sensitive).
Re: Case-sensitive SASL mechanisms and compression algorithms?
Author: Julien ÉLIE
Date: Mon, 03 Oct 2016 20:58
Date: Mon, 03 Oct 2016 20:58
61 lines
3298 bytes
3298 bytes
Hi Michael,
>> What should we do for NNTP compression algorithms?
>> As we'll create a specific registry for NNTP, should we also enforce
>> case sensitivity? That is to say "COMprEss deFLAte" is not valid,
>> whereas "COMprEss DEFLATE" is?
>>
>> Any thoughts about that?
>
> In general:
> Case insensitive definitions require an additional processing step for
> the parser on the receiving side. And on the sending side I see no
> advantage too: A command or other protocol keyword is implemented into
> the programs (and nothing that a user will enter via keyboard - with
> potentially wrong case).
>
> For the NNTP protocol:
> The commands itself are case insensitive, so it may look inconsequent
> to define the compression algorithms case sensitive.
>
> I'm not sure what is the better option. Personally I would vote for
> defining it the SASL way (case sensitive).
Thanks for your detailed point of view.
I'll follow your conclusion (that I also share), and define compression
algorithms case sensitive.
It is consistent with RFC 3977:
Section 3.1
Commands in NNTP MUST consist of a keyword, which MAY be followed
by one or more arguments.
[...]
Commands may have variants; if so, they use a second keyword
immediately after the first to indicate which variant is required.
The only such commands in this specification are LIST and MODE.
[...]
Keywords are case insensitive; the case of keywords for commands MUST
be ignored by the server. Command and response arguments are case or
language specific only when stated, either in this document or in
other relevant specifications.
In the case of COMPRESS:
- the command (COMPRESS) is case insensitive (like any keyword),
- the command has an argument (e.g., DEFLATE), that is not a keyword,
and therefore can be said to be case sensitive.
--
Julien ÉLIE
« On ne peut jamais être neutre. Le silence est une opinion. »
(Henri Moret)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads