Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 50739
Status: resolved
Worked: 40 min
Priority: 0/
Queue: IPC-Run

People
Owner: TODDR [...] cpan.org
Requestors:
Cc:
AdminCc:

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



Subject: PATHEXT logic bug if cmd_name contains 5.11.1
( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension? will match '.11.1/perl' if $cmd_name = 'C:/perl/5.11.1/perl'; See attached patch-IPC-Run-0.84-IPC-Run-0.8401.txt
Subject: patch-IPC-Run-0.84-IPC-Run-0.8401.txt
diff -ruN IPC-Run-0.84/lib/IPC/Run/Win32IO.pm IPC-Run-0.8401/lib/IPC/Run/Win32IO.pm --- IPC-Run-0.84/lib/IPC/Run/Win32IO.pm 2009-07-12 17:57:41.000000000 -0700 +++ IPC-Run-0.8401/lib/IPC/Run/Win32IO.pm 2009-10-21 20:18:40.000000000 -0700 @@ -393,7 +393,7 @@ { $port = $next_port; $next_port = 2048 if ++$next_port > 65_535; - unless ( bind $listener, sockaddr_in( $port, INADDR_ANY ) ) { + unless ( bind $listener, sockaddr_in( $port, $loopback ) ) { push @errors, "$! on port $port"; croak join "\n", @errors if @errors > 10; goto PORT_FINDER_LOOP; diff -ruN IPC-Run-0.84/lib/IPC/Run.pm IPC-Run-0.8401/lib/IPC/Run.pm --- IPC-Run-0.84/lib/IPC/Run.pm 2009-07-12 17:57:41.000000000 -0700 +++ IPC-Run-0.8401/lib/IPC/Run.pm 2009-10-22 01:12:12.406250000 -0700 @@ -1011,7 +1011,7 @@ use Exporter (); use vars qw{$VERSION @ISA @FILTER_IMP @FILTERS @API @EXPORT_OK %EXPORT_TAGS}; BEGIN { - $VERSION = '0.84'; + $VERSION = '0.8401'; @ISA = qw{ Exporter }; ## We use @EXPORT for the end user's convenience: there's only one function @@ -1149,12 +1149,16 @@ if ( Win32_MODE && ( $cmd_name =~ /$dirsep/ ) - && ( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension? +# && ( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension? + && ( $cmd_name !~ m!\.[^\\/\.]+$! ) ) { + + _debug "no extension(.exe), checking ENV{PATHEXT}" if _debugging; for ( split /;/, $ENV{PATHEXT} || ".COM;.BAT;.EXE" ) { my $name = "$cmd_name$_"; $cmd_name = $name, last if -f $name && -x _; } + _debug "cmd_name is now '$cmd_name'" if _debugging; } if ( $cmd_name =~ /($dirsep)/ ) {
On Thu Oct 22 04:18:17 2009, noreply wrote: Show quoted text
> > ( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension? > > will match '.11.1/perl' if > $cmd_name = 'C:/perl/5.11.1/perl'; > > See attached patch-IPC-Run-0.84-IPC-Run-0.8401.txt
Hi, looking at your patch, can you tell me the purpose of the proposed changes in the diff for lib/IPC/Run/Win32IO.pm?
Fix will be in 0.85 but I'm leaving this ticket open to make a test for now.
I put a basic test together to prove the new functionality of the regex for _search_path
Le 2010-03-22 19:27:48, TODDR a écrit : Show quoted text
> Hi, looking at your patch, can you tell me the purpose of the proposed > changes in the diff for lib/IPC/Run/Win32IO.pm?
That part of the patch does not seem related to this issue. It has been reported as an other issue: 49693 (security patch for lib\IPC\Run\Win32IO.pm s/INADDR_ANY/$loopback/) -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
Ticket migrated to github as https://github.com/toddr/IPC-Run/issues/80