Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interoperability issue of DIGEST-MD5 with "auth-int" and "auth-conf" qops #43

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
17 changes: 16 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Revision history for Perl distribution libnet

3.14 Development
3.16 Development

- TODO

3.15 2023-03-20

- Release for updating bleadperl to avoid cmp_version.t trouble. No code
changes.

3.14 2022-05-22

- Remove broken link in Net::FTP manpage. [Mike Blackwell]

- Fix EBCDIC detection. [Karl Williamson, PR#45]

- Fix non-deterministic output in libnet.cfg. [Sergei Trofimovich, PR#44]

- Fix TLS session reuse for dataconn with TLS 1.3 when using passive mode.
[Steffen Ullrich, PR#41]
Expand Down
2 changes: 1 addition & 1 deletion Configure
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ print "Writing $libnet_cfg\n";

print $fh "{\n";

foreach my $key (keys %cfg) {
foreach my $key (sort keys %cfg) {
my $val = $cfg{$key};
if(!defined($val)) {
$val = "undef";
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ MAIN: {
ABSTRACT => 'Collection of network protocol modules',
AUTHOR => 'Graham Barr <gbarr@pobox.com>, Steve Hay <shay@cpan.org>',
LICENSE => 'perl_5',
VERSION => '3.14',
VERSION => '3.16',

META_MERGE => {
'meta-spec' => {
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ INSTALLATION
COPYRIGHT

Copyright (C) 1996-2007 Graham Barr. All rights reserved.
Copyright (C) 2013-2017, 2020, 2021 Steve Hay. All rights reserved.
Copyright (C) 2013-2017, 2020-2023 Steve Hay. All rights reserved.

LICENCE

Expand Down
31 changes: 24 additions & 7 deletions lib/Net/Cmd.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Net::Cmd.pm
#
# Copyright (C) 1995-2006 Graham Barr. All rights reserved.
# Copyright (C) 2013-2016, 2020 Steve Hay. All rights reserved.
# Copyright (C) 2013-2016, 2020, 2022 Steve Hay. All rights reserved.
# This module is free software; you can redistribute it and/or modify it under
# the same terms as Perl itself, i.e. under the terms of either the GNU General
# Public License or the Artistic License, as specified in the F<LICENCE> file.
Expand All @@ -19,14 +19,14 @@ use Symbol 'gensym';
use Errno 'EINTR';

BEGIN {
if ($^O eq 'os390') {
if (ord "A" == 193) {
require Convert::EBCDIC;

# Convert::EBCDIC->import;
}
}

our $VERSION = "3.14";
our $VERSION = "3.16";
our @ISA = qw(Exporter);
our @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);

Expand All @@ -41,7 +41,7 @@ use constant DEF_REPLY_CODE => 421;

my %debug = ();

my $tr = $^O eq 'os390' ? Convert::EBCDIC->new() : undef;
my $tr = ord "A" == 193 ? Convert::EBCDIC->new() : undef;

sub toebcdic {
my $cmd = shift;
Expand Down Expand Up @@ -188,9 +188,24 @@ sub set_status {
1;
}

# The default encode/decode methods
sub encode {
my ($cmd, $text, $len) = @_;

$text;
}


sub decode {
my ($cmd, $text, $len) = @_;

$text;
}


sub _syswrite_with_timeout {
my $cmd = shift;
my $line = shift;
my $line = $cmd->encode($_[0], length($_[0]));

my $len = length($line);
my $offset = 0;
Expand Down Expand Up @@ -352,6 +367,8 @@ sub getline {

substr($buf, 0, 0) = $partial; ## prepend from last sysread

$buf = $cmd->decode($buf, length($buf)); ## decode it

my @buf = split(/\015?\012/, $buf, -1); ## break into lines

$partial = pop @buf;
Expand Down Expand Up @@ -887,7 +904,7 @@ libnet as of version 1.22_02.

Copyright (C) 1995-2006 Graham Barr. All rights reserved.

Copyright (C) 2013-2016, 2020 Steve Hay. All rights reserved.
Copyright (C) 2013-2016, 2020, 2022 Steve Hay. All rights reserved.

=head1 LICENCE

Expand All @@ -897,7 +914,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
4 changes: 2 additions & 2 deletions lib/Net/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use Socket qw(inet_aton inet_ntoa);

our @EXPORT = qw(%NetConfig);
our @ISA = qw(Net::LocalCfg Exporter);
our $VERSION = "3.14";
our $VERSION = "3.16";

our($CONFIGURE, $LIBNET_CFG);

Expand Down Expand Up @@ -368,7 +368,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
4 changes: 2 additions & 2 deletions lib/Net/Domain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use Net::Config;

our @ISA = qw(Exporter);
our @EXPORT_OK = qw(hostname hostdomain hostfqdn domainname);
our $VERSION = "3.14";
our $VERSION = "3.16";

my ($host, $domain, $fqdn) = (undef, undef, undef);

Expand Down Expand Up @@ -395,7 +395,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
23 changes: 5 additions & 18 deletions lib/Net/FTP.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Net::FTP.pm
#
# Copyright (C) 1995-2004 Graham Barr. All rights reserved.
# Copyright (C) 2013-2017, 2020 Steve Hay. All rights reserved.
# Copyright (C) 2013-2017, 2020, 2022 Steve Hay. All rights reserved.
# This module is free software; you can redistribute it and/or modify it under
# the same terms as Perl itself, i.e. under the terms of either the GNU General
# Public License or the Artistic License, as specified in the F<LICENCE> file.
Expand All @@ -23,7 +23,7 @@ use Net::Config;
use Socket;
use Time::Local;

our $VERSION = '3.14';
our $VERSION = '3.16';

our $IOCLASS;
my $family_key;
Expand Down Expand Up @@ -66,7 +66,7 @@ use constant TELNET_IAC => 255;
use constant TELNET_IP => 244;
use constant TELNET_DM => 242;

use constant EBCDIC => $^O eq 'os390';
use constant EBCDIC => ord 'A' == 193;

sub new {
my $pkg = shift;
Expand Down Expand Up @@ -1959,19 +1959,6 @@ Reinitialize the connection, flushing all I/O and account information.

=back

=head1 EXAMPLES

For an example of the use of Net::FTP see

=over 4

=item L<https://www.csh.rit.edu/~adam/Progs/>

C<autoftp> is a program that can retrieve, send, or list files via
the FTP protocol in a non-interactive manner.

=back

=head1 EXPORTS

I<None>.
Expand Down Expand Up @@ -2027,7 +2014,7 @@ libnet as of version 1.22_02.

Copyright (C) 1995-2004 Graham Barr. All rights reserved.

Copyright (C) 2013-2017, 2020 Steve Hay. All rights reserved.
Copyright (C) 2013-2017, 2020, 2022 Steve Hay. All rights reserved.

=head1 LICENCE

Expand All @@ -2037,7 +2024,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/FTP/A.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;

our @ISA = qw(Net::FTP::dataconn);
our $VERSION = "3.14";
our $VERSION = "3.16";

our $buf;

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/FTP/E.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;

our @ISA = qw(Net::FTP::I);
our $VERSION = "3.14";
our $VERSION = "3.16";

1;
2 changes: 1 addition & 1 deletion lib/Net/FTP/I.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Net::FTP::dataconn;

our @ISA = qw(Net::FTP::dataconn);
our $VERSION = "3.14";
our $VERSION = "3.16";

our $buf;

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/FTP/L.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ use warnings;
use Net::FTP::I;

our @ISA = qw(Net::FTP::I);
our $VERSION = "3.14";
our $VERSION = "3.16";

1;
4 changes: 2 additions & 2 deletions lib/Net/FTP/dataconn.pm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Carp;
use Errno;
use Net::Cmd;

our $VERSION = '3.14';
our $VERSION = '3.16';

$Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn";
our @ISA = $Net::FTP::IOCLASS;
Expand Down Expand Up @@ -224,7 +224,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
4 changes: 2 additions & 2 deletions lib/Net/NNTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use Net::Cmd;
use Net::Config;
use Time::Local;

our $VERSION = "3.14";
our $VERSION = "3.16";

# Code for detecting if we can use SSL
my $ssl_class = eval {
Expand Down Expand Up @@ -1308,7 +1308,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
4 changes: 2 additions & 2 deletions lib/Net/Netrc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use warnings;
use Carp;
use FileHandle;

our $VERSION = "3.14";
our $VERSION = "3.16";

our $TESTING;

Expand Down Expand Up @@ -353,7 +353,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
4 changes: 2 additions & 2 deletions lib/Net/POP3.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use IO::Socket;
use Net::Cmd;
use Net::Config;

our $VERSION = "3.14";
our $VERSION = "3.16";

# Code for detecting if we can use SSL
my $ssl_class = eval {
Expand Down Expand Up @@ -869,7 +869,7 @@ License or the Artistic License, as specified in the F<LICENCE> file.

=head1 VERSION

Version 3.14
Version 3.16

=head1 DATE

Expand Down
Loading