Article View: news.software.nntp
Article #89886Re: Proposal specifications for MAXARTNUM
From: Julien ÉLIE
Date: Thu, 22 Dec 2022 18:49
Date: Thu, 22 Dec 2022 18:49
160 lines
8490 bytes
8490 bytes
Hi Richard, >> So here's the need I wish to deal with. In the same way MAXARTNUM is >> designed not to break existing legacy 32-bit implementations, it >> shouldn't break existing 64-bit implementations which went ahead and >> are using large article numbers. >> I came up with that idea formulated in the above paragraph. Note that >> a server that only implements a global parameter for the initial >> maximum article number (set to 2^31-1) is compliant! >> >> Do you happen to have another better solution for that need? > > I do see the problem. > > One answer is to say that those servers are out of spec and can continue > being out of spec, including the MAXARTNUM spec. :-) That was my initial thought before I made up my mind and wrote the "recommendation". > Anyway, I think we shouldn’t impose unnecessary requirements (the > RECOMMENDED) on other servers. Ah, OK, the point was for the RECOMMENDED. I agree it is too strong. > My suggestion therefore would be something like: > > A server implementation MAY configure a maximum article number for a > connection based on other techniques, for example client > fingerprinting, per-user configuration or server > configuration. Configuring a value greater than the default of > 2147483647 SHOULD be done only for clients known to be capable of > handling article numbers up to that configured maximum article number. Yes, MAY is better. I'll take into account your proposal. >>>> A server supporting the MAXARTNUM command as defined in this document >>>> will advertise the "MAXARTNUM" capability label in response to the >>>> CAPABILITIES command (Section 5.2 of [RFC3977]). However, this >>>> capability MUST NOT be advertised once the MAXARTNUM command has >>>> successfully been executed. >>> Why not? Seems like an entirely unnecessary restriction on the >>> server. >> >> The problem I see in going on advertising MAXARTNUM is CAPABILITIES is >> that it may be confusing. >> The server could advertise "MAXARTNUM N" whereas a value different >> than N has been negotiated. > > IMO that isn’t very likely, but the inconsistency could be explicitly > forbidden if it’s a concern. I'll mention the reason for the restriction. This way, it will be clearer for a future reader. >> And usually, after the use of commands like AUTHINFO, COMPRESS, >> STARTTLS which change something in the connection, they are no longer >> advertised in CAPABILITIES. >> >> Do you see a drawback in no longer advertising it either? > > My suggestion would be to forbid the server from changing its MAXARTNUM > advertisement in CAPABILITIES. For example: > > A server that does not advertize MAXARTNUM in one CAPABILITIES > response MUST NOT then advertizing it in a subsequent CAPABILITIES > response in the same session without an intervening successful MODE > READER. > > A server that advertizes MAXARTNUM in one CAPABILITIES response MUST > NOT remove it, or advertize a different maximum article number, in a > subsequent CAPABILITIES response in the same session without an > intervening successful MODE READER. It could be done this way, indeed, with the MAXARTNUM capability still advertised after the use of the command. The drawback I see is that it may be incoherent with the possibility for a client to use the command. Normally, CAPABILITIES shows what the client can use at a given moment; that's why the initial proposition was to hide it when the MAXARTNUM command can no longer be sent. > Once a MAXARTNUM command has succeeded, a server MAY reply 502 to > all subsequent MAXARTNUM commands. The problem with MAY is that it leaves a choice. Both the developers of news clients and news servers will have to decide what to do. Whereas the MUST NOT use twice the command is pretty clear, and everyone knows what to do. Doesn't it seem simpler? I do not see why we should allow a change of mutual maximum article, once negotiated. (In the same way you don't change the negotiated compression method or TLS cipher in the middle of an NNTP session.) >> Command lines MUST NOT exceed >> 512 octets, which includes the terminating CRLF pair. The arguments >> MUST NOT exceed 497 octets. A server MAY relax these limits for >> commands defined in an extension. >> >> The initial line of the response MUST NOT exceed >> 512 octets, which includes the response code and the terminating CRLF >> pair; an extension MAY specify a greater maximum for commands that it >> defines, but not for any other command. >> >> So there is a problem for instance with "OVER N-M" where N and M are >> compounded of 497 digits. >> And also in existing responses, as we may have a large article number >> followed by a Message-ID up to 250 characters itself! >> And even in GROUP responses, there may be 3 large article numbers >> followed by a newsgroup name. (Is there an upper bound for the length >> of a newsgroup name? I do not manage to find it in RFC 3977 or 5536.) >> >> Something should definitively be said about that in the MAXARTNUM >> extension... >> >> Should we then restrict the maximum length of article numbers to a >> precise number, given these requirements? >> For version 2 of NNTP, we may for instance take 40 bytes, which is >> enough for 2^128 articles. And just say a future version may relax >> the current limits in the length of command lines and initial response >> lines. >> >> Do you see any other idea to deal with that issue? > > Article numbers of 2^63 aren’t realistic. Even at a thousand articles > per second it would take hundreds of millions of years to reach such a > large article number. For 128-bit article numbers we’re talking 10^27 > years. > > So I don’t think we need to worry about these very large > numbers. They’re not happening. So we may just say that the maximum length of an article number is increased by this extension from 16 to 45 (including possible 6 leading zeroes) in version 2 of NNTP because of other incompressible constraints on the length of command lines and initial response lines. I believe something needs being said about the maximum allowed, so as not to be vague. And better put a limit corresponding to the "next step" (2^128) instead of the one we consider in 2022 (2^64). This way, the problem is closed for version 2 of the protocol. As you say, it should normally be enough for several years or maybe forever for the needs of NNTP. (As a side note, future 128-bit processors will probably treat "long long" as 128-bit integers, and existing implementations built on such architectures may advertise that length... I don't know how current 256-bit GPU treat "long long".) -- Julien ÉLIE « – Mais lâchez-moi ! Vous voyez bien que je suis déjà repoussé ! – Il y en a un qui est entré ! – Je ressors ! Je ressors ! Je ressors ! » (Astérix)
Technical Details
Message-ID:
<to28sj$3alfe$2@news.trigofacile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com> <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk>Show Full Headers
Complete Article Headers
Message-ID: <to28sj$3alfe$2@news.trigofacile.com> Subject: Re: Proposal specifications for MAXARTNUM Date: Thu, 22 Dec 2022 19:49:55 +0100 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com> <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: Groupes francophones par TrigoFACILE Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 22 Dec 2022 18:49:55 -0000 (UTC) Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="3495406"; mail-complaints-to="abuse@trigofacile.com" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Cancel-Lock: sha1:zck5WG64KXTpRkm8oGzXWBftI1k= sha256:wIhYFtyp7swTkjVH8Nd3/uoyECjZozLlM27HhWfHcQY= sha1:8cDSWaj1IJkgpkp0KHk62t84D/c= sha256:zUusEgP3DSy5LiLWaqC+Mkob/iloWmxeAGPTUJq0efE= In-Reply-To: <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk>