# HG changeset patch # User Craig Mohrman # Date 1340225444 25200 # Node ID cd5a2da081ff7b46f1795222cba8200e05d9eaf6 # Parent 50516829ab6470de3ebb17c9085c09ec11aa9aa9 7030196 Problem with utility/perl diff -r 50516829ab64 -r cd5a2da081ff components/perl512/patches/CVE-2010-2761.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/perl512/patches/CVE-2010-2761.patch Wed Jun 20 13:50:44 2012 -0700 @@ -0,0 +1,2873 @@ +diff -Naur perl-5.12.4/cpan/CGI/Changes CGI.pm-3.59/cpan/CGI/Changes +--- perl-5.12.4/cpan/CGI/Changes 2011-06-07 13:04:05.000000000 -0700 ++++ CGI.pm-3.59/cpan/CGI/Changes 2011-12-30 05:28:52.000000000 -0800 +@@ -1,10 +1,184 @@ +-Version 3.49 ++Version 3.59 Dec 29th, 2011 ++ ++ [BUG FIXES] ++ - We no longer read from STDIN when the Content-Length is not set, preventing ++ requests with no Content-Length from freezing in some cases. This is consistent ++ with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old ++ behavior may have been expected by some command-line uses of CGI.pm. ++ Thanks to Philip Potter and Yanick Champoux. See RT#52469 for details: ++ https://rt.cpan.org/Public/Bug/Display.html?id=52469 ++ ++ [INTERNALS] ++ - remove tmpdirs more aggressively. Thanks to rjbs (RT#73288) ++ - use Text::ParseWords instead of ancient shellwords.pl. Thanks to AlexBio. ++ - remove use of define(@arr). Thanks to rjbs. ++ - spelling fixes. Thanks to Gregor Herrmann and Alessandro Ghedini. ++ - fix test count and warning in t/fast.t. Thanks to Yanick. ++ ++Version 3.58 Nov 11th, 2011 ++ ++ [DOCUMENTATION] ++ - Clarify that using query_string() only has defined behavior when using the GET method. (RT#60813) ++ ++Version 3.57 Nov 9th, 2011 ++ [INTERNALS] ++ - test failure in t/fast.t introduced in 3.56 is fixed. (Thanks to zefram and chansen). ++ - Test::More requirement has been bumped to 0.98 ++ ++Version 3.56 Nov 8th, 2011 ++ ++ [SECURITY] ++ Use public and documented FCGI.pm API in CGI::Fast ++ CGI::Fast was using an FCGI API that was deprecated and removed from ++ documentation more than ten years ago. Usage of this deprecated API with ++ FCGI >= 0.70 or FCGI <= 0.73 introduces a security issue. ++ ++ ++ (Thanks to chansen) ++ ++ [INTERNALS] ++ - tmp files are now cleaned up on VMS ( RT#69210, thanks to cberry@cpan.org ) ++ - Fixed test failure: done_testing() added to url.t (Thanks to Ryan Jendoubi) ++ - Clarify preferred bug submission location in docs, and note that Mark Stosberg ++ is the current maintainer. ++ ++Version 3.55 June 3rd, 2011 ++ ++ [THINGS THAT MAY BREAK YOUR CODE] ++ url() was fixed to return "PATH_INFO" when it is explicitly requested ++ with either the path=>1 or path_info=>1 flag. ++ ++ If your code is running under mod_rewrite (or compatible) and you are calling self_url() or ++ you are calling url() and passing path_info=>1, These methods will actually be ++ returning PATH_INFO now, as you have explicitly requested, or has self_url() ++ has requested on your behalf. ++ ++ The PATH_INFO has been omitted in such URLs since the issue was introduced ++ in the 3.12 release in December, 2005. ++ ++ This bug is so old your application may have come to depend on it or ++ workaround it. Check for application before upgrading to this release. ++ ++ Examples of affected method calls: ++ ++ $q->url(-absolute => 1, -query => 1, -path_info => 1 ) ++ $q->url(-path=>1) ++ $q->url(-full=>1,-path=>1) ++ $q->url(-rewrite=>1,-path=>1) ++ $q->self_url(); ++ ++Version 3.54, Apr 28, 2011 ++ No code changes ++ ++ [INTERNALS] ++ - Address test failures in t/tmpdir.t, thanks to Niko Tyni. ++ Some tests here are failing on some platforms and have been marked as TODO. ++ ++Version 3.53, Apr 25, 2011 ++ ++ [NEW FEATURES] ++ - The DELETE HTTP verb is now supported. ++ (RT#52614, James Robson, Eduardo Ari�o de la Rubia) ++ ++ [INTERNALS] ++ - Correct t/tmpdir.t MANIFEST entry. (RT#64949) ++ - Update minimum required Perl version to be Perl 5.8.1, which ++ has been out since 2003. This allows us to drop some hacks ++ and exceptions (Mark Stosberg) ++ ++Version 3.52, Jan 24, 2011 ++ ++ [DOCUMENTATION] ++ - The documentation for multi-line header handling was been updated to reflect ++ the changes in 3.51. (Mark Stosberg, ntyni@iki.fi) ++ ++ [INTERNALS] ++ - Add missing t/tmpfile.t file. (RT#64949) ++ - Fix warning in t/cookie.t (RT#64570, Chris Williams, Rainer Tammer, Mark Stosberg) ++ - Fixed logic bug in t/multipart_init.t (RT#64261, Niko Tyni) ++ ++Version 3.51, Jan 5, 2011 ++ ++ [NEW FEATURES] ++ - A new option to set $CGI::Carp::TO_BROWSER = 0, allows you to explicitly ++ exclude a particular scope from triggering printing to the browser when ++ fatatlsToBrowser is set. (RT#62783, Thanks to papowell) ++ - The + + + +diff -Naur perl-5.12.4/cpan/CGI/t/multipart_init.t CGI.pm-3.59/cpan/CGI/t/multipart_init.t +--- perl-5.12.4/cpan/CGI/t/multipart_init.t 2011-06-07 13:04:05.000000000 -0700 ++++ CGI.pm-3.59/cpan/CGI/t/multipart_init.t 1969-12-31 16:00:00.000000000 -0800 +@@ -1,20 +0,0 @@ +-use Test::More 'no_plan'; +- +-use CGI; +- +-my $q = CGI->new; +- +-my $sv = $q->multipart_init; +-like( $sv, qr|Content-Type: multipart/x-mixed-replace;boundary="------- =|, 'multipart_init(), basic'); +- +-like( $sv, qr/$CGI::CRLF$/, 'multipart_init(), ends in CRLF' ); +- +-$sv = $q->multipart_init( 'this_is_the_boundary' ); +-like( $sv, qr/boundary="this_is_the_boundary"/, 'multipart_init("simple_boundary")' ); +-$sv = $q->multipart_init( -boundary => 'this_is_another_boundary' ); +-like($sv, +- qr/boundary="this_is_another_boundary"/, "multipart_init( -boundary => 'this_is_another_boundary')"); +- +-$sv = $q->multipart_init; +-my $sv2 = $q->multipart_init; +-isnt($sv,$sv2,"due to random boundaries, multiple calls produce different results"); +diff -Naur perl-5.12.4/cpan/CGI/t/param_fetch.t CGI.pm-3.59/cpan/CGI/t/param_fetch.t +--- perl-5.12.4/cpan/CGI/t/param_fetch.t 1969-12-31 16:00:00.000000000 -0800 ++++ CGI.pm-3.59/cpan/CGI/t/param_fetch.t 2011-01-05 10:13:45.000000000 -0800 +@@ -0,0 +1,26 @@ ++#!perl ++ ++# Tests for the param_fetch() method. ++ ++use Test::More 'no_plan'; ++use CGI; ++ ++{ ++ my $q = CGI->new('b=baz;a=foo;a=bar'); ++ ++ is $q->param_fetch('a')->[0] => 'foo', 'first "a" is "foo"'; ++ is $q->param_fetch( -name => 'a' )->[0] => 'foo', ++ 'first "a" is "foo", with -name'; ++ is $q->param_fetch('a')->[1] => 'bar', 'second "a" is "bar"'; ++ is_deeply $q->param_fetch('a') => [qw/ foo bar /], 'a is array ref'; ++ is_deeply $q->param_fetch( -name => 'a' ) => [qw/ foo bar /], ++ 'a is array ref, w/ name'; ++ ++ is $q->param_fetch('b')->[0] => 'baz', '"b" is "baz"'; ++ is_deeply $q->param_fetch('b') => [qw/ baz /], 'b is array ref too'; ++ ++ is_deeply $q->param_fetch, [], "param_fetch without parameters"; ++ ++ is_deeply $q->param_fetch( 'a', 'b' ), [qw/ foo bar /], ++ "param_fetch only take first argument"; ++} +diff -Naur perl-5.12.4/cpan/CGI/t/rt-52469.t CGI.pm-3.59/cpan/CGI/t/rt-52469.t +--- perl-5.12.4/cpan/CGI/t/rt-52469.t 1969-12-31 16:00:00.000000000 -0800 ++++ CGI.pm-3.59/cpan/CGI/t/rt-52469.t 2011-12-30 05:22:19.000000000 -0800 +@@ -0,0 +1,14 @@ ++use strict; ++use warnings; ++ ++use Test::More tests => 1; # last test to print ++ ++use CGI; ++ ++$ENV{REQUEST_METHOD} = 'PUT'; ++ ++my $cgi = CGI->new; ++ ++pass 'new() returned'; ++ ++ +diff -Naur perl-5.12.4/cpan/CGI/t/tmpdir.t CGI.pm-3.59/cpan/CGI/t/tmpdir.t +--- perl-5.12.4/cpan/CGI/t/tmpdir.t 1969-12-31 16:00:00.000000000 -0800 ++++ CGI.pm-3.59/cpan/CGI/t/tmpdir.t 2011-12-30 04:52:33.000000000 -0800 +@@ -0,0 +1,40 @@ ++#!perl ++use Test::More tests => 9; ++use strict; ++ ++my ($testdir, $testdir2); ++ ++BEGIN { ++ $testdir = "CGItest"; ++ $testdir2 = "CGItest2"; ++ for ($testdir, $testdir2) { ++ ( -d ) || mkdir $_; ++ ( ! -w ) || chmod 0700, $_; ++ } ++ $CGITempFile::TMPDIRECTORY = $testdir; ++ $ENV{TMPDIR} = $testdir2; ++} ++ ++use CGI; ++is($CGITempFile::TMPDIRECTORY, $testdir, "can pre-set \$CGITempFile::TMPDIRECTORY"); ++CGITempFile->new; ++is($CGITempFile::TMPDIRECTORY, $testdir, "\$CGITempFile::TMPDIRECTORY unchanged"); ++ ++TODO: { ++ local $TODO = "figuring out why these tests fail on some platforms"; ++ ok(chmod 0500, $testdir, "revoking write access to $testdir"); ++ ok(! -w $testdir, "write access to $testdir revoked"); ++CGITempFile->new; ++is($CGITempFile::TMPDIRECTORY, $testdir2, ++ "unwritable \$CGITempFile::TMPDIRECTORY overridden"); ++ ++ok(chmod 0500, $testdir2, "revoking write access to $testdir2"); ++ok(! -w $testdir, "write access to $testdir revoked"); ++CGITempFile->new; ++isnt($CGITempFile::TMPDIRECTORY, $testdir2, ++ "unwritable \$ENV{TMPDIR} overridden"); ++isnt($CGITempFile::TMPDIRECTORY, $testdir, ++ "unwritable \$ENV{TMPDIR} not overridden with an unwritable \$CGITempFile::TMPDIRECTORY"); ++} ++ ++END { for ($testdir, $testdir2) { chmod 0700, $_; rmdir; } } +diff -Naur perl-5.12.4/cpan/CGI/t/url.t CGI.pm-3.59/cpan/CGI/t/url.t +--- perl-5.12.4/cpan/CGI/t/url.t 2011-06-01 00:47:46.000000000 -0700 ++++ CGI.pm-3.59/cpan/CGI/t/url.t 2011-11-09 07:49:15.000000000 -0800 +@@ -1,9 +1,10 @@ + use strict; + use warnings; + +-use Test::More tests => 4; # last test to print ++use Test::More; ++ ++use CGI ':all'; + +-use CGI qw/ :all /; + + $ENV{HTTP_X_FORWARDED_HOST} = 'proxy:8484'; + $ENV{SERVER_PROTOCOL} = 'HTTP/1.0'; +@@ -21,3 +22,51 @@ + + is url() => 'http://proxy', 'url() with default port'; + ++subtest 'rewrite_interactions' => sub { ++ # Reference: RT#45019 ++ ++ local %ENV = ( ++ # These two are always set ++ 'SCRIPT_NAME' => '/real/cgi-bin/dispatch.cgi', ++ 'SCRIPT_FILENAME' => '/home/mark/real/path/cgi-bin/dispatch.cgi', ++ ++ # These two are added by mod_rewrite Ref: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html ++ ++ 'SCRIPT_URL' => '/real/path/info', ++ 'SCRIPT_URI' => 'http://example.com/real/path/info', ++ ++ 'PATH_INFO' => '/path/info', ++ 'REQUEST_URI' => '/real/path/info', ++ 'HTTP_HOST' => 'example.com' ++ ); ++ ++ my $q = CGI->new; ++ ++ is( ++ $q->url( -absolute => 1, -query => 1, -path_info => 1 ), ++ '/real/path/info', ++ '$q->url( -absolute => 1, -query => 1, -path_info => 1 ) should return complete path, even when mod_rewrite is detected.' ++ ); ++ is( $q->url(), 'http://example.com/real', '$q->url(), with rewriting detected' ); ++ is( $q->url(-full=>1), 'http://example.com/real', '$q->url(-full=>1), with rewriting detected' ); ++ is( $q->url(-path=>1), 'http://example.com/real/path/info', '$q->url(-path=>1), with rewriting detected' ); ++ is( $q->url(-path=>0), 'http://example.com/real', '$q->url(-path=>0), with rewriting detected' ); ++ is( $q->url(-full=>1,-path=>1), 'http://example.com/real/path/info', '$q->url(-full=>1,-path=>1), with rewriting detected' ); ++ is( $q->url(-rewrite=>1,-path=>0), 'http://example.com/real', '$q->url(-rewrite=>1,-path=>0), with rewriting detected' ); ++ is( $q->url(-rewrite=>1), 'http://example.com/real', ++ '$q->url(-rewrite=>1), with rewriting detected' ); ++ is( $q->url(-rewrite=>0), 'http://example.com/real/cgi-bin/dispatch.cgi', ++ '$q->url(-rewrite=>0), with rewriting detected' ); ++ is( $q->url(-rewrite=>0,-path=>1), 'http://example.com/real/cgi-bin/dispatch.cgi/path/info', ++ '$q->url(-rewrite=>0,-path=>1), with rewriting detected' ); ++ is( $q->url(-rewrite=>1,-path=>1), 'http://example.com/real/path/info', ++ '$q->url(-rewrite=>1,-path=>1), with rewriting detected' ); ++ is( $q->url(-rewrite=>0,-path=>0), 'http://example.com/real/cgi-bin/dispatch.cgi', ++ '$q->url(-rewrite=>0,-path=>1), with rewriting detected' ); ++ done_testing(); ++}; ++ ++ ++done_testing(); ++ ++ +diff -Naur perl-5.12.4/MANIFEST CGI.pm-3.59/MANIFEST +--- perl-5.12.4/MANIFEST 2011-06-07 13:04:05.000000000 -0700 ++++ CGI.pm-3.59/MANIFEST 2012-06-13 14:15:21.906099448 -0700 +@@ -198,30 +198,36 @@ + cpan/CGI/t/autoescape.t See if CGI.pm works + cpan/CGI/t/can.t See if CGI.pm works + cpan/CGI/t/carp.t See if CGI::Carp works ++cpan/CGI/t/charset.t + cpan/CGI/t/checkbox_group.t See if CGI.pm works + cpan/CGI/t/cookie.t See if CGI::Cookie works ++cpan/CGI/t/delete.t + cpan/CGI/t/Dump.t See if CGI->Dump works + cpan/CGI/t/end_form.t See if CGI.pm works ++cpan/CGI/t/fast.t See if CGI.pm works + cpan/CGI/t/form.t See if CGI.pm works + cpan/CGI/t/function.t See if CGI.pm works ++cpan/CGI/t/gen-tests/gen-start-end-tags.pl + cpan/CGI/t/headers.t See if CGI.pm works + cpan/CGI/t/hidden.t See if CGI.pm works + cpan/CGI/t/html.t See if CGI.pm works + cpan/CGI/t/http.t See if CGI.pm works + cpan/CGI/t/init.t See if CGI.pm works + cpan/CGI/t/init_test.txt See if CGI.pm works +-cpan/CGI/t/multipart_init.t See if CGI.pm works + cpan/CGI/t/no_tabindex.t See if CGI.pm works ++cpan/CGI/t/param_fetch.t + cpan/CGI/t/popup_menu.t See if CGI pop menus work + cpan/CGI/t/pretty.t See if CGI.pm works + cpan/CGI/t/push.t See if CGI::Push works + cpan/CGI/t/query_string.t See if CGI->query_string() works + cpan/CGI/t/request.t See if CGI.pm works ++cpan/CGI/t/rt-52469.t + cpan/CGI/t/save_read_roundtrip.t See if CGI.pm works + cpan/CGI/t/start_end_asterisk.t See if CGI.pm works + cpan/CGI/t/start_end_end.t See if CGI.pm works + cpan/CGI/t/start_end_start.t See if CGI.pm works + cpan/CGI/t/switch.t See if CGI::Switch still loads ++cpan/CGI/t/tmpdir.t + cpan/CGI/t/unescapeHTML.t See if CGI::unescapeHTML() works + cpan/CGI/t/uploadInfo.t See if CGI.pm works + cpan/CGI/t/upload_post_text.txt Test data for CGI.pm diff -r 50516829ab64 -r cd5a2da081ff components/perl512/patches/CVE-2011-2728.patch --- a/components/perl512/patches/CVE-2011-2728.patch Wed Jun 20 10:19:47 2012 -0700 +++ b/components/perl512/patches/CVE-2011-2728.patch Wed Jun 20 13:50:44 2012 -0700 @@ -46,12 +46,3 @@ +# This used to segfault. +my $i = bsd_glob('*', GLOB_ALTDIRFUNC); +is(&File::Glob::GLOB_ERROR, 0, "Successfuly ignored unsupported flag"); ---- perl-5.12.3/patchlevel.h.orig út lis 15 13:26:11 2011 -+++ perl-5.12.3/patchlevel.h út lis 15 13:26:17 2011 -@@ -131,6 +131,7 @@ - ,"uncommitted-changes" - #endif - PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */ -+ ,"7111771 Problem with utility/perl" - ,NULL - }; diff -r 50516829ab64 -r cd5a2da081ff components/perl512/patches/CVE-2011-3597.patch --- a/components/perl512/patches/CVE-2011-3597.patch Wed Jun 20 10:19:47 2012 -0700 +++ b/components/perl512/patches/CVE-2011-3597.patch Wed Jun 20 13:50:44 2012 -0700 @@ -298,13 +298,15 @@ +$LOL::PWNED = 0; +eval { Digest->new(q[MD;5;$LOL::PWNED = 42]) }; +is $LOL::PWNED, 0; ---- perl-5.12.4/patchlevel.h Mo jun 4 16:58:05 2012 -+++ perl-5.12.4/patchlevel.h Mo jun 4 16:58:23 2012 -@@ -132,6 +132,7 @@ - #endif - PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */ - ,"7111771 Problem with utility/perl" -+ ,"7125218 Problem with utility/perl" - ,NULL - }; - +diff -Naur perl-5.12.4/MANIFEST new/MANIFEST +--- perl-5.12.4/MANIFEST 2012-06-13 14:23:21.347805553 -0700 ++++ new/MANIFEST 2012-06-13 15:08:46.655737770 -0700 +@@ -704,6 +704,8 @@ + cpan/Digest/t/base.t See if Digest extensions work + cpan/Digest/t/digest.t See if Digest extensions work + cpan/Digest/t/file.t See if Digest extensions work ++cpan/Digest/t/lib/Digest/Dummy.pm ++cpan/Digest/t/security.t + cpan/Encode/AUTHORS List of authors + cpan/Encode/bin/enc2xs Encode module generator + cpan/Encode/bin/piconv iconv by perl diff -r 50516829ab64 -r cd5a2da081ff components/perl512/patches/patchlevel_h.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/perl512/patches/patchlevel_h.patch Wed Jun 20 13:50:44 2012 -0700 @@ -0,0 +1,12 @@ +--- perl-5.12.4/patchlevel.h 2011-06-15 10:14:22.000000000 -0700 ++++ CGI.pm-3.59/patchlevel.h 2012-06-13 18:10:17.136255349 -0700 +@@ -131,6 +131,9 @@ + ,"uncommitted-changes" + #endif + PERL_GIT_UNPUSHED_COMMITS /* do not remove this line */ ++ ,"7111771 Problem with utility/perl" ++ ,"7125218 Problem with utility/perl" ++ ,"7030196 Problem with utility/perl" + ,NULL + }; +