Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 129966
Status: new
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: e [...] 80x24.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH|PULL] Net::Cmd fixes for TLS
Date: Wed, 3 Jul 2019 01:01:11 +0000
To: bug-libnet [...] rt.cpan.org
From: Eric Wong <e [...] 80x24.org>
The first patch is purely a cleanup and tiny optimization I couldn't resist :P The second patch fixes a theoretical bug which becomes a real bug once I started implementing NNTP compression support (coming in the next ticket) Patches attached, or git pull if you prefer that: The following changes since commit ee9142670b970c5967f8cb9b7d6ccbf7883e53fa: Use L<> for links (2017-12-15 09:06:58 +0000) are available in the Git repository at: https://80x24.org/perl-libnet.git read-early for you to fetch changes up to 6f1c2c717f6e2858e5d62073c47efe11e597e067: Net::Cmd: fix ->getline if SSL_read overreads (2019-07-02 20:20:37 +0000) ---------------------------------------------------------------- Eric Wong (2): Net::Cmd: append directly to partial buf on sysread Net::Cmd: fix ->getline if SSL_read overreads lib/Net/Cmd.pm | 72 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 27 deletions(-)

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: [rt.cpan.org #129966] [RESCIND] Net::Cmd fixes for TLS
Date: Fri, 5 Jul 2019 19:10:56 +0000
To: bug-libnet [...] rt.cpan.org
From: Eric Wong <e [...] 80x24.org>
cf. https://rt.cpan.org/Ticket/Display.html?id=129966 Actually, there's no need for this as-is without compression support. But it's still needed for NNTP COMPRESS in [rt.cpan.org #129967]. The thing is Net::Cmd::getline doesn't get called once STARTTLS comes into play, ->getline calls go to IO::Socket::SSL::getline. However, Net::Cmd::getline comes back into play with when compression is enabled after STARTTLS (RFC 8054 prohibits COMPRESS before STARTTLS) To summarize what happens to how Net::NNTP reads responses: COMPRESS alone: Net::Cmd::getline STARTTLS alone: IO::Socket::SSL::getline STARTTLS+COMPRESS: Net::Cmd::getline [rt.cpan.org #129967] OO can be confusing sometimes :< Also, I noticed IO::Socket::SSL::getline preserves CRLF, while Net::Cmd::getline converts to LF. Not a big deal, but it threw me off a bit while implementing COMPRESS support on public-inbox-nntpd and validating the results by comparing responses of the different transport options.