summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2008-09-05 17:26:44 +0000
committerSteve Hay <SteveHay@planit.com>2008-09-05 17:26:44 +0000
commit598d6e99fadb6f0e660491546091a7130ff8a2e9 (patch)
tree193e2a3c96c416e194c2f90c476ab09fd65baf3f
parent920f5fe1a21416b02b9eb56d00b9844b23dacbff (diff)
downloadperl-598d6e99fadb6f0e660491546091a7130ff8a2e9.tar.gz
Fix a couple of failing CGI.pm tests on Win32
(My temporary directory is C:\DOCUME~1\shay\LOCALS~1\Temp, so we need to allow ~ characters.) p4raw-id: //depot/perl@34278
-rw-r--r--lib/CGI.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CGI.pm b/lib/CGI.pm
index 5196528f3f..c4ee7bfefb 100644
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
@@ -3760,7 +3760,7 @@ sub new {
(my $safename = $name) =~ s/([':%])/ sprintf '%%%02X', ord $1 /eg;
my $fv = ++$FH . $safename;
my $ref = \*{"Fh::$fv"};
- $file =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\-]+)$! || return;
+ $file =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\~-]+)$! || return;
my $safe = $1;
sysopen($ref,$safe,Fcntl::O_RDWR()|Fcntl::O_CREAT()|Fcntl::O_EXCL(),0600) || return;
unlink($safe) if $delete;
@@ -4086,7 +4086,7 @@ $MAXTRIES = 5000;
sub DESTROY {
my($self) = @_;
- $$self =~ m!^([a-zA-Z0-9_ \'\":/.\$\\-]+)$! || return;
+ $$self =~ m!^([a-zA-Z0-9_ \'\":/.\$\\~-]+)$! || return;
my $safe = $1; # untaint operation
unlink $safe; # get rid of the file
}
@@ -4107,7 +4107,7 @@ sub new {
last if ! -f ($filename = sprintf("\%s${SL}CGItemp%d", $TMPDIRECTORY, $sequence++));
}
# check that it is a more-or-less valid filename
- return unless $filename =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\-]+)$!;
+ return unless $filename =~ m!^([a-zA-Z0-9_\+ \'\":/.\$\\~-]+)$!;
# this used to untaint, now it doesn't
# $filename = $1;
return bless \$filename;