Skip Menu |
 

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 84584
Status: resolved
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: kan [...] dcit.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in:
  • 0.19_001
  • 0.20



Subject: accept ignores class name
Date: Fri, 12 Apr 2013 00:23:58 +0200 (CEST)
To: bug-IO-Socket-IP [...] rt.cpan.org
From: Pavel Kankovsky <kan [...] dcit.cz>
Download (untitled) / with headers
text/plain 972b
Distribution name and version: IO-Socket-IP-0.19 Perl version: 5.10.1 Operating System vendor and version: CentOS 6 Problem: accept method does not pass the optional class name to the superclass. This breaks any code depending on a new incoming connection being blessed in a given class. A notable example is any recent version of IO::Socket::SSL that dies with "Not a HASH reference" at a seemingly unrelated point in accept_SSL because it mistakes the new socket for an argument hash. The following change appears to fix the bug: ---snip--- --- IO/Socket/IP.pm.old 2013-03-12 02:35:39.000000000 +0100 +++ IO/Socket/IP.pm 2013-04-11 23:52:41.682713871 +0200 @@ -795,7 +795,7 @@ sub accept { my $self = shift; - my ( $new, $peer ) = $self->SUPER::accept or return; + my ( $new, $peer ) = $self->SUPER::accept(@_) or return; ${*$new}{$_} = ${*$self}{$_} for qw( io_socket_domain io_socket_type io_socket_proto ); ---snip--- -- Pavel Kankovsky
Download (untitled) / with headers
text/plain 514b
On Thu Apr 11 18:24:15 2013, kan@dcit.cz wrote: Show quoted text
> Problem: accept method does not pass the optional class name to the > superclass. This breaks any code depending on a new incoming > connection > being blessed in a given class. A notable example is any recent > version of > IO::Socket::SSL that dies with "Not a HASH reference" at a seemingly > unrelated point in accept_SSL because it mistakes the new socket for > an > argument hash.
Oops. Patch now applied; will be in next release. Thanks, -- Paul Evans
Was released a while ago as 0.20 -- Paul Evans


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.