Hello community, here is the log from the commit of package perl-HTTP-Body for openSUSE:Factory checked in at 2015-02-10 20:21:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-HTTP-Body (Old) and /work/SRC/openSUSE:Factory/.perl-HTTP-Body.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-HTTP-Body" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-HTTP-Body/perl-HTTP-Body.changes 2014-03-15 07:47:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-HTTP-Body.new/perl-HTTP-Body.changes 2015-02-10 20:21:37.000000000 +0100 @@ -1,0 +2,19 @@ +Fri Feb 6 13:13:02 UTC 2015 - [email protected] + +- updated to 1.22 + 1.22 2015-01-29 04:51:51+01:00 Europe/Berlin + - Fix for the fix..... don't ask + + 1.21 2015-01-29 04:48:58+01:00 Europe/Berlin + - Fix for failing test if Plack is not installed + + 1.20 2015-01-28 16:20:59+01:00 Europe/Berlin + -new method 'part_data' which preserves multipart meta information just in cause + you have a form upload with unexpected charsets, etc. + + 1.19 + - Release for cleanup of dzil + +- obsolete CVE-2013-4407.patch + +------------------------------------------------------------------- Old: ---- CVE-2013-4407.patch HTTP-Body-1.19.tar.gz New: ---- HTTP-Body-1.22.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-HTTP-Body.spec ++++++ --- /var/tmp/diff_new_pack.8sJmeC/_old 2015-02-10 20:21:38.000000000 +0100 +++ /var/tmp/diff_new_pack.8sJmeC/_new 2015-02-10 20:21:38.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-HTTP-Body # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-HTTP-Body -Version: 1.19 +Version: 1.22 Release: 0 %define cpan_name HTTP-Body Summary: HTTP Body Parser @@ -25,26 +25,15 @@ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/HTTP-Body/ Source: http://www.cpan.org/authors/id/G/GE/GETTY/%{cpan_name}-%{version}.tar.gz -## originally taken from debian: Allow only word characters in filename suffixes -# correct fix was already mention in code, but not used. :( -Patch0: CVE-2013-4407.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(HTTP::Headers) +BuildRequires: perl(HTTP::Request::Common) BuildRequires: perl(IO::File) >= 1.14 BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::More) >= 0.86 -#BuildRequires: perl(HTTP::Body) -#BuildRequires: perl(HTTP::Body::MultiPart) -#BuildRequires: perl(HTTP::Body::OctetStream) -#BuildRequires: perl(HTTP::Body::UrlEncoded) -#BuildRequires: perl(HTTP::Body::XForms) -#BuildRequires: perl(HTTP::Body::XFormsMultipart) -#BuildRequires: perl(HTTP::Message) -#BuildRequires: perl(PAML) -#BuildRequires: perl(Test::Perl::Critic) Requires: perl(HTTP::Headers) Requires: perl(IO::File) >= 1.14 %{perl_requires} @@ -60,7 +49,6 @@ %prep %setup -q -n %{cpan_name}-%{version} -%patch0 %build %{__perl} Makefile.PL INSTALLDIRS=vendor ++++++ HTTP-Body-1.19.tar.gz -> HTTP-Body-1.22.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/Changes new/HTTP-Body-1.22/Changes --- old/HTTP-Body-1.19/Changes 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/Changes 2015-01-29 04:51:53.000000000 +0100 @@ -1,7 +1,17 @@ This file documents the revision history for Perl extension HTTP::Body. -1.19 2013-12-06 10:07:24 America/New_York - - Release for cleanup of dzil +1.22 2015-01-29 04:51:51+01:00 Europe/Berlin + - Fix for the fix..... don't ask + +1.21 2015-01-29 04:48:58+01:00 Europe/Berlin + - Fix for failing test if Plack is not installed + +1.20 2015-01-28 16:20:59+01:00 Europe/Berlin + -new method 'part_data' which preserves multipart meta information just in cause + you have a form upload with unexpected charsets, etc. + +1.19 + - Release for cleanup of dzil 1.18 2013-12-06 10:05:33 America/New_York - Added configurable basename regexp, test added with fixed regexp for next release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/LICENSE new/HTTP-Body-1.22/LICENSE --- old/HTTP-Body-1.19/LICENSE 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/LICENSE 2015-01-29 04:51:53.000000000 +0100 @@ -1,4 +1,4 @@ -This software is copyright (c) 2013 by Christian Hansen. +This software is copyright (c) 2015 by Christian Hansen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2013 by Christian Hansen. +This software is Copyright (c) 2015 by Christian Hansen. This is free software, licensed under: @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2013 by Christian Hansen. +This software is Copyright (c) 2015 by Christian Hansen. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/MANIFEST new/HTTP-Body-1.22/MANIFEST --- old/HTTP-Body-1.19/MANIFEST 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/MANIFEST 2015-01-29 04:51:53.000000000 +0100 @@ -1,3 +1,4 @@ +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020. Changes LICENSE MANIFEST @@ -23,6 +24,7 @@ t/07xforms.t t/08multipart-suffix.t t/09rt88342.t +t/10mixparamcontent.t t/data/multipart/001-content.dat t/data/multipart/001-headers.pml t/data/multipart/001-results.pml @@ -100,3 +102,4 @@ t/data/xforms/002-headers.pml t/data/xforms/002-results.pml t/lib/PAML.pm +t/utf8.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/META.yml new/HTTP-Body-1.22/META.yml --- old/HTTP-Body-1.19/META.yml 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/META.yml 2015-01-29 04:51:53.000000000 +0100 @@ -6,24 +6,28 @@ - 'Andy Grundman, C<[email protected]>' - 'Torsten Raudssus, C<[email protected]>' build_requires: - Test::Deep: 0 - Test::More: 0.86 + Encode: '0' + File::Spec::Functions: '0' + File::Temp: '0.14' + HTTP::Request::Common: '0' + Test::Deep: '0' + Test::More: '0.86' configure_requires: - ExtUtils::MakeMaker: 6.30 + ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830' +generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.133380' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: HTTP-Body requires: - Carp: 0 - Digest::MD5: 0 - File::Temp: 0.14 - HTTP::Headers: 0 - IO::File: 1.14 + Carp: '0' + Digest::MD5: '0' + File::Temp: '0.14' + HTTP::Headers: '0' + IO::File: '1.14' resources: Mailing_list: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev repository: git://git.shadowcat.co.uk/catagits/HTTP-Body.git -version: 1.19 +version: '1.22' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/Makefile.PL new/HTTP-Body-1.22/Makefile.PL --- old/HTTP-Body-1.19/Makefile.PL 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/Makefile.PL 2015-01-29 04:51:53.000000000 +0100 @@ -1,19 +1,19 @@ +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020. use strict; use warnings; -use ExtUtils::MakeMaker 6.30; +use ExtUtils::MakeMaker ; my %WriteMakefileArgs = ( "ABSTRACT" => "HTTP Body Parser", "AUTHOR" => "Christian Hansen, C<chansen\@cpan.org>, Sebastian Riedel, C<sri\@cpan.org>, Andy Grundman, C<andy\@hybridized.org>, Torsten Raudssus, C<getty\@cpan.org>", - "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { - "ExtUtils::MakeMaker" => "6.30" + "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "HTTP-Body", "EXE_FILES" => [], @@ -27,10 +27,14 @@ "IO::File" => "1.14" }, "TEST_REQUIRES" => { + "Encode" => 0, + "File::Spec::Functions" => 0, + "File::Temp" => "0.14", + "HTTP::Request::Common" => 0, "Test::Deep" => 0, "Test::More" => "0.86" }, - "VERSION" => "1.19", + "VERSION" => "1.22", "test" => { "TESTS" => "t/*.t" } @@ -40,8 +44,11 @@ my %FallbackPrereqs = ( "Carp" => 0, "Digest::MD5" => 0, + "Encode" => 0, + "File::Spec::Functions" => 0, "File::Temp" => "0.14", "HTTP::Headers" => 0, + "HTTP::Request::Common" => 0, "IO::File" => "1.14", "Test::Deep" => 0, "Test::More" => "0.86" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/README new/HTTP-Body-1.22/README --- old/HTTP-Body-1.19/README 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/README 2015-01-29 04:51:53.000000000 +0100 @@ -1,13 +1,15 @@ This archive contains the distribution HTTP-Body, -version 1.19: +version 1.22: HTTP Body Parser -This software is copyright (c) 2013 by Christian Hansen. +This software is copyright (c) 2015 by Christian Hansen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. +This README file was generated by Dist::Zilla::Plugin::Readme v5.020. + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/dist.ini new/HTTP-Body-1.22/dist.ini --- old/HTTP-Body-1.19/dist.ini 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/dist.ini 2015-01-29 04:51:53.000000000 +0100 @@ -23,6 +23,10 @@ [Prereqs / TestRequires] Test::More = 0.86 Test::Deep = 0 +HTTP::Request::Common = 0 +Encode = 0 +File::Spec::Functions = 0 +File::Temp = 0 [PruneFiles] match = ^t/data/benchmark/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body/MultiPart.pm new/HTTP-Body-1.22/lib/HTTP/Body/MultiPart.pm --- old/HTTP-Body-1.19/lib/HTTP/Body/MultiPart.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body/MultiPart.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body::MultiPart; -{ - $HTTP::Body::MultiPart::VERSION = '1.19'; -} - +$HTTP::Body::MultiPart::VERSION = '1.22'; use strict; use base 'HTTP::Body'; use bytes; @@ -303,8 +300,11 @@ $self->upload( $part->{name}, $part ); } } + # If we have more than the content-disposition, we need to create a + # data key so that we don't waste the headers. else { $self->param( $part->{name}, $part->{data} ); + $self->part_data( $part->{name}, $part ) } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body/OctetStream.pm new/HTTP-Body-1.22/lib/HTTP/Body/OctetStream.pm --- old/HTTP-Body-1.19/lib/HTTP/Body/OctetStream.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body/OctetStream.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body::OctetStream; -{ - $HTTP::Body::OctetStream::VERSION = '1.19'; -} - +$HTTP::Body::OctetStream::VERSION = '1.22'; use strict; use base 'HTTP::Body'; use bytes; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body/UrlEncoded.pm new/HTTP-Body-1.22/lib/HTTP/Body/UrlEncoded.pm --- old/HTTP-Body-1.19/lib/HTTP/Body/UrlEncoded.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body/UrlEncoded.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body::UrlEncoded; -{ - $HTTP::Body::UrlEncoded::VERSION = '1.19'; -} - +$HTTP::Body::UrlEncoded::VERSION = '1.22'; use strict; use base 'HTTP::Body'; use bytes; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body/XForms.pm new/HTTP-Body-1.22/lib/HTTP/Body/XForms.pm --- old/HTTP-Body-1.19/lib/HTTP/Body/XForms.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body/XForms.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body::XForms; -{ - $HTTP::Body::XForms::VERSION = '1.19'; -} - +$HTTP::Body::XForms::VERSION = '1.22'; use strict; use base 'HTTP::Body'; use bytes; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body/XFormsMultipart.pm new/HTTP-Body-1.22/lib/HTTP/Body/XFormsMultipart.pm --- old/HTTP-Body-1.19/lib/HTTP/Body/XFormsMultipart.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body/XFormsMultipart.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body::XFormsMultipart; -{ - $HTTP::Body::XFormsMultipart::VERSION = '1.19'; -} - +$HTTP::Body::XFormsMultipart::VERSION = '1.22'; use strict; use base 'HTTP::Body::MultiPart'; use bytes; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/lib/HTTP/Body.pm new/HTTP-Body-1.22/lib/HTTP/Body.pm --- old/HTTP-Body-1.19/lib/HTTP/Body.pm 2013-12-06 16:07:25.000000000 +0100 +++ new/HTTP-Body-1.22/lib/HTTP/Body.pm 2015-01-29 04:51:53.000000000 +0100 @@ -1,8 +1,5 @@ package HTTP::Body; -{ - $HTTP::Body::VERSION = '1.19'; -} - +$HTTP::Body::VERSION = '1.22'; use strict; use Carp qw[ ]; @@ -117,6 +114,7 @@ param_order => [], state => 'buffering', upload => {}, + part_data => {}, tmpdir => File::Spec->tmpdir(), }; @@ -387,6 +385,45 @@ return $self->{upload}; } +=item part_data + +Just like 'param' but gives you a hash of the full data associated with the +part in a multipart type POST/PUT. Example: + + { + data => "test", + done => 1, + headers => { + "Content-Disposition" => "form-data; name=\"arg2\"", + "Content-Type" => "text/plain" + }, + name => "arg2", + size => 4 + } + +=cut + +sub part_data { + my $self = shift; + + if ( @_ == 2 ) { + + my ( $name, $data ) = @_; + + if ( exists $self->{part_data}->{$name} ) { + for ( $self->{part_data}->{$name} ) { + $_ = [$_] unless ref($_) eq "ARRAY"; + push( @$_, $data ); + } + } + else { + $self->{part_data}->{$name} = $data; + } + } + + return $self->{part_data}; +} + =item tmpdir Specify a different path for temporary files. Defaults to the system temporary path. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/t/10mixparamcontent.t new/HTTP-Body-1.22/t/10mixparamcontent.t --- old/HTTP-Body-1.19/t/10mixparamcontent.t 1970-01-01 01:00:00.000000000 +0100 +++ new/HTTP-Body-1.22/t/10mixparamcontent.t 2015-01-29 04:51:53.000000000 +0100 @@ -0,0 +1,110 @@ +use utf8; +use warnings; +use strict; + +use Test::More; +use Test::Deep; +use HTTP::Body; +use HTTP::Request::Common; +use Encode; +use File::Spec::Functions; +use File::Temp qw/ tempdir /; + +SKIP: { + eval { require HTTP::Message::PSGI }; + + skip "Plack not installed", 13 if $@; + + my $string_for_utf8 = 'test ♥'; + my $string_in_utf8 = Encode::encode('UTF-8',$string_for_utf8); + my $string_for_shiftjis = 'test テスト'; + my $string_in_shiftjis = Encode::encode('SHIFT_JIS',$string_for_shiftjis); + my $path = File::Spec->catfile('t', 'utf8.txt'); + + ok my $req = POST '/root/echo_arg', + Content_Type => 'form-data', + Content => [ + arg0 => 'helloworld', + arg1 => [ + undef, '', + 'Content-Type' =>'text/plain; charset=UTF-8', + 'Content' => $string_in_utf8, ], + arg2 => [ + undef, '', + 'Content-Type' =>'text/plain; charset=SHIFT_JIS', + 'Content' => $string_in_shiftjis, ], + arg2 => [ + undef, '', + 'Content-Type' =>'text/plain; charset=SHIFT_JIS', + 'Content' => $string_in_shiftjis, ], + file => [ + "$path", Encode::encode_utf8('♥ttachment.txt'), 'Content-Type' =>'text/html; charset=UTF-8' + ], + ]; + + + ok my $env = HTTP::Message::PSGI::req_to_psgi($req); + ok my $fh = $env->{'psgi.input'}; + ok my $body = HTTP::Body->new( $req->header('Content-Type'), $req->header('Content-Length') ); + ok my $tempdir = tempdir( 'XXXXXXX', CLEANUP => 1, DIR => File::Spec->tmpdir() ); + $body->tmpdir($tempdir); + + binmode $fh, ':raw'; + + while ( $fh->read( my $buffer, 1024 ) ) { + $body->add($buffer); + } + + is $body->param->{'arg0'}, 'helloworld'; + is $body->param->{'arg1'}, $string_in_utf8; + is $body->param->{'arg2'}[0], $string_in_shiftjis; + is $body->param->{'arg2'}[1], $string_in_shiftjis; + + cmp_deeply( + $body->part_data->{'arg0'}, + { + data => 'helloworld', + headers => { + 'Content-Disposition' => re(qr{^form-data\b}), + }, + done => 1, + name => 'arg0', + size => 10, + }, + 'arg0 part data correct', + ); + cmp_deeply( + $body->part_data->{'arg1'}, + { + data => $string_in_utf8, + headers => { + 'Content-Disposition' => re(qr{^form-data\b}), + 'Content-Type' => 'text/plain; charset=UTF-8', + }, + done => 1, + name => 'arg1', + size => length($string_in_utf8), + }, + 'arg1 part data correct', + ); + + cmp_deeply( + $body->part_data->{'arg2'}, + [ + ({ + data => $string_in_shiftjis, + headers => { + 'Content-Disposition' => re(qr{^form-data\b}), + 'Content-Type' => 'text/plain; charset=SHIFT_JIS', + }, + done => 1, + name => 'arg2', + size => length($string_in_shiftjis), + }) x 2, + ], + 'arg2 part data correct', + ); + +}; + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Body-1.19/t/utf8.txt new/HTTP-Body-1.22/t/utf8.txt --- old/HTTP-Body-1.19/t/utf8.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/HTTP-Body-1.22/t/utf8.txt 2015-01-29 04:51:53.000000000 +0100 @@ -0,0 +1 @@ +<p>This is stream_body_fh action ♥</p> -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
