Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 43796
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors: Peter.Hancock [...] mincom.com
Cc:
AdminCc:

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



MIME-Version: 1.0
MIME-Version: 1.0
X-Spam-Status: No, hits=4.1 required=8.0 tests=HTML_MESSAGE,SARE_GIF_ATTACH,TRACKER_ID
X-Mailer: IBM Lotus Domino Access for MS Outlook (2007) Release 8.0.2 August 07, 2008
X-Mimetrack: Itemize by Notes Client on Peter Hancock/AUS/Mincom(Release 8.0.2|August 07, 2008) at 03/03/2009 11:10:12 AM, Serialize by Router on BNEDOM05/AU/Mincom(Release 8.0.2FP1|January 12, 2009) at 03/03/2009 11:10:12 AM
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Importance: Normal
Content-Type: multipart/related; boundary="=_related 00066D9D4A25756E_="
Message-ID: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 10E2C4DCF21 for <bug-CGI.pm [...] rt.cpan.org>; Mon, 2 Mar 2009 20:10:21 -0500 (EST)
Received: (qmail 29857 invoked by uid 103); 3 Mar 2009 01:10:21 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 3 Mar 2009 01:10:21 -0000
Received: from mail1.mincom.com (HELO bnepms03.mincom.oz.au) (203.13.90.248) by 16.mx.develooper.com (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Mar 2009 17:10:18 -0800
Received: from bnedom05.mincom.oz.au (unverified [172.17.65.154]) by bnepms03.mincom.oz.au (Clearswift SMTPRS 5.2.3) with ESMTP id <T8cd877d125cb0d5af8af4 [...] bnepms03.mincom.oz.au> for <bug-CGI.pm [...] rt.cpan.org>; Tue, 3 Mar 2009 11:19:12 +1000
Delivered-To: cpan-bug+CGI.pm [...] diesel.bestpractical.com
Subject: Temporary directory bug in version 3.41
Return-Path: <Peter.Hancock [...] mincom.com>
X-Original-To: bug-CGI.pm [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
X-Priority: 3 (Normal)
Date: Tue, 3 Mar 2009 11:10:11 +1000
X-Spam-Level: ****
To: bug-CGI.pm [...] rt.cpan.org
From: Peter.Hancock [...] mincom.com
Content-Length: 0
Content-Type: image/gif
content-disposition: inline; filename="image001.gif"
Content-Transfer-Encoding: base64
Content-ID: <image001.gif [...] 01C99BE9.211F8990>
Content-Length: 3798
Download image001.gif
image/gif 3.7k
image001.gif
Content-Type: multipart/alternative; boundary="=_alternative 00066D9F4A25756E_="
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: us-ascii
Content-Length: 3448
Download (untitled) / with headers
text/plain 3.3k
Hi, I'm using a Windows Vista SP1 workstation. As part of a FosWiki pilot study, I installed the ActivePerl 5.8.9 distribution (CGI.pm 3.42) along with Apache 2.2.11 ... Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_FAST_STDIO USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 825 [288577] Iin_load_module moved for compatibility with build 806 Less verbose ExtUtils::Install and Pod::Find Rearrange @INC so that 'site' is searched before 'perl' Partly reverted 24733 to preserve binary compatibility 31188 Problem killing a pseudo-forked child on Win32 29732 ANSIfy the PATH environment variable on Windows 27527,29868 win32_async_check() can loop indefinitely 26379 Fix alarm() for Windows 2003 Built under MSWin32 Compiled at Dec 14 2008 21:07:41 @INC: C:/Perl/site/lib C:/Perl/lib . I found that FosWiki was reporting errors during searching ... [Thu Feb 26 12:12:04 2009] [error] [client 172.17.118.55] [Thu Feb 26 12:11:33 2009] CGI.pm: Use of uninitialized value in -d at C:/Perl/lib/CGI.pm line 4083. ... and tracked the problem to the following code in CGI.pm (commencing line 4064) which was added in version 3.41 ... if( $CGI::OS eq 'WINDOWS' ){ unshift @TEMP, $ENV{TEMP}, $ENV{TMP}, $ENV{WINDIR} . $SL . 'TEMP'; } When Apache is running as a service (presumably with untainting in effect), the first two evars are not defined and are added to the array as undef elements. When referenced a few lines later, the error occurs (from line 4082) ... foreach (@TEMP) { do {$TMPDIRECTORY = $_; last} if -d $_ && -w _; } Presumably, this error only occurs when the "-w" option is in effect. My suggested replacement code for the above lines (4064 through 4069) is ... if( $CGI::OS eq 'WINDOWS' ){ # PeterH: These evars may not exist if this is invoked within a service and untainting # is in effect - with 'use warnings' the undefined array entries causes Perl to die unshift(@TEMP,$ENV{TEMP}) if defined $ENV{TEMP}; unshift(@TEMP,$ENV{TMP}) if defined $ENV{TMP}; unshift(@TEMP,$ENV{WINDIR} . $SL . 'TEMP') if defined $ENV{WINDIR}; } I hope that this is enough information for you to implement the fix in a future release. Regards, signature_with_contact_details Mincom. <http://www.mincom.com/> The People. The Experience. The Vision. This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by Mincom Pty Ltd unless expressly stated otherwise. -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. --
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: iso-8859-1
Content-Length: 13176
Download (untitled) / with headers
text/html 12.8k

Message body is not shown because it is too large.

MIME-Version: 1.0
In-Reply-To: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-6413-1248053146-1594.43796-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 3607
Download (untitled) / with headers
text/plain 3.5k
Thanks for the report and patch, Peter. Your solution looks reasonable to me, and I recommend that it is included in a future release. Mark On Mon Mar 02 20:10:34 2009, Peter.Hancock@mincom.com wrote: Show quoted text
> Hi, > > > > I'm using a Windows Vista SP1 workstation. > > > > As part of a FosWiki pilot study, I installed the ActivePerl 5.8.9 > distribution (CGI.pm 3.42) along with Apache 2.2.11 ... > > > > Characteristics of this binary (from libperl): > > Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT > PERL_IMPLICIT_SYS > > PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_FAST_STDIO > > USE_ITHREADS USE_LARGE_FILES USE_PERLIO > > USE_SITECUSTOMIZE > > Locally applied patches: > > ActivePerl Build 825 [288577] > > Iin_load_module moved for compatibility with build 806 > > Less verbose ExtUtils::Install and Pod::Find > > Rearrange @INC so that 'site' is searched before 'perl' > > Partly reverted 24733 to preserve binary compatibility > > 31188 Problem killing a pseudo-forked child on Win32 > > 29732 ANSIfy the PATH environment variable on Windows > > 27527,29868 win32_async_check() can loop indefinitely > > 26379 Fix alarm() for Windows 2003 > > Built under MSWin32 > > Compiled at Dec 14 2008 21:07:41 > > @INC: > > C:/Perl/site/lib > > C:/Perl/lib > > . > > > > I found that FosWiki was reporting errors during searching ... > > > > [Thu Feb 26 12:12:04 2009] [error] [client 172.17.118.55] [Thu Feb 26 > 12:11:33 2009] CGI.pm: Use of uninitialized value in -d at > C:/Perl/lib/CGI.pm line 4083. > > > > ... and tracked the problem to the following code in CGI.pm (commencing > line 4064) which was added in version 3.41 ... > > > > if( $CGI::OS eq 'WINDOWS' ){ > > unshift @TEMP, > > $ENV{TEMP}, > > $ENV{TMP}, > > $ENV{WINDIR} . $SL . 'TEMP'; > > } > > > > When Apache is running as a service (presumably with untainting in > effect), the first two evars are not defined and are added to the array > as undef elements. When referenced a few lines later, the error occurs > (from line 4082) ... > > > > foreach (@TEMP) { > > do {$TMPDIRECTORY = $_; last} if -d $_ && -w _; > > } > > > > Presumably, this error only occurs when the "-w" option is in effect. > > > > My suggested replacement code for the above lines (4064 through 4069) > is ... > > > > if( $CGI::OS eq 'WINDOWS' ){ > > # PeterH: These evars may not exist if this is invoked within a > service and untainting > > # is in effect - with 'use warnings' the undefined array entries > causes Perl to die > > unshift(@TEMP,$ENV{TEMP}) if defined $ENV{TEMP}; > > unshift(@TEMP,$ENV{TMP}) if defined $ENV{TMP}; > > unshift(@TEMP,$ENV{WINDIR} . $SL . 'TEMP') if defined > $ENV{WINDIR}; > > } > > > > I hope that this is enough information for you to implement the fix in a > future release. > > > > Regards, > > signature_with_contact_details > > Mincom. <http://www.mincom.com/> The People. The Experience. The > Vision. > > This transmission is for the intended addressee only and is confidential > information. If you have received this transmission in error, please > notify the sender and delete the transmission. The contents of this > e-mail are the opinion of the writer only and are not endorsed by Mincom > Pty Ltd unless expressly stated otherwise. > > >
MIME-Version: 1.0
In-Reply-To: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-14916-1249095720-352.43796-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 58
Thanks for the patch. I've applied it to my git repo now.
MIME-Version: 1.0
Subject: released, thanks.
In-Reply-To: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <OFA0DDC329.1E641533-ON4A25756E.00066D64 [...] mincom.com>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-26882-1250300504-978.43796-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 94
I believe this change was released today as part of CGI.pm 3.45. Thanks for the contribution.


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.