GNU bug report logs - #41960
nntp.el: Switch back to CAPABILITIES command?

Previous Next

Package: emacs;

Reported by: Kyle Meyer <kyle <at> kyleam.com>

Date: Sat, 20 Jun 2020 02:34:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41960 in the body.
You can then email your comments to 41960 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org:
bug#41960; Package emacs. (Sat, 20 Jun 2020 02:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kyle Meyer <kyle <at> kyleam.com>:
New bug report received and forwarded. Copy sent to larsi <at> gnus.org, bug-gnu-emacs <at> gnu.org. (Sat, 20 Jun 2020 02:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kyle Meyer <kyle <at> kyleam.com>
To: bug-gnu-emacs <at> gnu.org
Subject: nntp.el: Switch back to CAPABILITIES command?
Date: Sat, 20 Jun 2020 02:33:25 +0000
In Emacs 24.4 [0], the command used in nntp.el for detecting NNTP
capabilities changed from CAPABILITIES to HELP to work around an issue
with a particular news server not recognizing the CAPABILITIES command
(bug#12763).

This probably works most the time because, according the RFC 3977 [1],
it is "customary for [HELP] to list the valid commands and give a brief
definition of what they do".  However, that same section says HELP
shouldn't be used as a replacement for CAPABILITIES.

A specific case where using HELP instead of CAPABILITIES causes an issue
is with public-inbox's [2] NNTP service, such as the one hosted at
<news.public-inbox.org>.  public-inbox doesn't include a list of
commands in its HELP output.  That is, it's not following the
convention, but it is still following the specification.  Because
nntp-open-connection tries to detect capabilities with HELP, it doesn't
catch the properly advertised STARTTLS capability and fails to upgrade
to a TLS connection.

I'm guessing that the server from bug#12763 didn't recognize
CAPABILITIES because it was based on RFC 977.  However, given RFC 3977
supersedes 977 and is from 2006, does it make sense at this point to
assume CAPABILITIES is supported?


[0] b9989bfa7e59b423df76b184e657b66017f72ff9
    lisp/gnus/nntp.el (nntp-open-connection): Fix nntp connection
    problems with the Typhoon server
    2012-12-28
[1] https://tools.ietf.org/html/rfc3977#section-7.2
[2] https://public-inbox.org/





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41960; Package emacs. (Sun, 19 Jul 2020 00:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 41960 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: 41960 <at> debbugs.gnu.org
Subject: Re: bug#41960: nntp.el: Switch back to CAPABILITIES command?
Date: Sun, 19 Jul 2020 02:32:57 +0200
Kyle Meyer <kyle <at> kyleam.com> writes:

> A specific case where using HELP instead of CAPABILITIES causes an issue
> is with public-inbox's [2] NNTP service, such as the one hosted at
> <news.public-inbox.org>.  public-inbox doesn't include a list of
> commands in its HELP output.  That is, it's not following the
> convention, but it is still following the specification.  Because
> nntp-open-connection tries to detect capabilities with HELP, it doesn't
> catch the properly advertised STARTTLS capability and fails to upgrade
> to a TLS connection.
>
> I'm guessing that the server from bug#12763 didn't recognize
> CAPABILITIES because it was based on RFC 977.  However, given RFC 3977
> supersedes 977 and is from 2006, does it make sense at this point to
> assume CAPABILITIES is supported?

Yeah, nntp.el should really use CAPABILITIES here, but working around
buggy NNTP software (i.e., Typhoon) would also be nice...  because NNTP
servers don't exactly get updated a lot these days.

Hm...  I think I see a way to do both here: `open-network-stream' today
only takes a string as a capability command, so we can't send different
commands based on the server software.  But we could easily extend that
function to allow taking a function, and use the greeting as the input
parameter, and then do HELP for Typhoon and CAPABILITIES for everything
else.

I'll give that a whirl and see how it goes...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41960; Package emacs. (Sun, 19 Jul 2020 00:59:02 GMT) Full text and rfc822 format available.

Message #11 received at 41960 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: 41960 <at> debbugs.gnu.org
Subject: Re: bug#41960: nntp.el: Switch back to CAPABILITIES command?
Date: Sun, 19 Jul 2020 02:58:08 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'll give that a whirl and see how it goes...

I had to add more support for this stuff in open-network-stream, but
nothing too horrid.

So this should be fixed in Emacs 28.1 now, and nntp.el sends CAPABILITES
to all servers, except Typhoon ones.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jul 2020 00:59:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 41960 <at> debbugs.gnu.org and Kyle Meyer <kyle <at> kyleam.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 19 Jul 2020 00:59:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41960; Package emacs. (Sun, 19 Jul 2020 02:04:02 GMT) Full text and rfc822 format available.

Message #18 received at 41960 <at> debbugs.gnu.org (full text, mbox):

From: Kyle Meyer <kyle <at> kyleam.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 41960 <at> debbugs.gnu.org
Subject: Re: bug#41960: nntp.el: Switch back to CAPABILITIES command?
Date: Sat, 18 Jul 2020 22:03:33 -0400
Lars Ingebrigtsen writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> I'll give that a whirl and see how it goes...
>
> I had to add more support for this stuff in open-network-stream, but
> nothing too horrid.
>
> So this should be fixed in Emacs 28.1 now, and nntp.el sends CAPABILITES
> to all servers, except Typhoon ones.

Great.  Thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 16 Aug 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.