Hello community, here is the log from the commit of package perl-CGI for openSUSE:Factory checked in at 2020-06-27 23:20:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-CGI (Old) and /work/SRC/openSUSE:Factory/.perl-CGI.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-CGI" Sat Jun 27 23:20:53 2020 rev:20 rq:816784 version:4.50 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-CGI/perl-CGI.changes 2020-06-11 14:44:04.817273834 +0200 +++ /work/SRC/openSUSE:Factory/.perl-CGI.new.3060/perl-CGI.changes 2020-06-27 23:20:59.797509882 +0200 @@ -1,0 +2,11 @@ +Tue Jun 23 03:07:24 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 4.50 + see /usr/share/doc/packages/perl-CGI/Changes + + 4.50 2019-06-22 + + [ ENHANCEMENT ] + - Add APPEND_QUERY_STRING option (GH #243, thanks to stevenh) + +------------------------------------------------------------------- Old: ---- CGI-4.49.tar.gz New: ---- CGI-4.50.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-CGI.spec ++++++ --- /var/tmp/diff_new_pack.ocsDsF/_old 2020-06-27 23:21:00.329511631 +0200 +++ /var/tmp/diff_new_pack.ocsDsF/_new 2020-06-27 23:21:00.329511631 +0200 @@ -17,7 +17,7 @@ Name: perl-CGI -Version: 4.49 +Version: 4.50 Release: 0 %define cpan_name CGI Summary: Handle Common Gateway Interface requests and responses ++++++ CGI-4.49.tar.gz -> CGI-4.50.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/Changes new/CGI-4.50/Changes --- old/CGI-4.49/Changes 2020-06-08 11:41:53.000000000 +0200 +++ new/CGI-4.50/Changes 2020-06-22 09:32:06.000000000 +0200 @@ -1,3 +1,8 @@ +4.50 2019-06-22 + + [ ENHANCEMENT ] + - Add APPEND_QUERY_STRING option (GH #243, thanks to stevenh) + 4.49 2020-06-08 [ FIX ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/MANIFEST new/CGI-4.50/MANIFEST --- old/CGI-4.49/MANIFEST 2020-06-08 11:43:55.000000000 +0200 +++ new/CGI-4.50/MANIFEST 2020-06-22 09:34:37.000000000 +0200 @@ -24,6 +24,7 @@ t/Dump.t t/arbitrary_handles.t t/autoescape.t +t/append_query.t t/can.t t/carp.t t/cgi.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/META.json new/CGI-4.50/META.json --- old/CGI-4.49/META.json 2020-06-08 11:43:55.000000000 +0200 +++ new/CGI-4.50/META.json 2020-06-22 09:34:37.000000000 +0200 @@ -78,6 +78,6 @@ "web" : "https://github.com/leejo/CGI.pm" } }, - "version" : "4.49", + "version" : "4.50", "x_serialization_backend" : "JSON::PP version 4.02" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/META.yml new/CGI-4.50/META.yml --- old/CGI-4.49/META.yml 2020-06-08 11:43:55.000000000 +0200 +++ new/CGI-4.50/META.yml 2020-06-22 09:34:37.000000000 +0200 @@ -47,5 +47,5 @@ homepage: https://metacpan.org/module/CGI license: http://dev.perl.org/licenses/ repository: https://github.com/leejo/CGI.pm -version: '4.49' +version: '4.50' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/Carp.pm new/CGI-4.50/lib/CGI/Carp.pm --- old/CGI-4.49/lib/CGI/Carp.pm 2020-06-08 11:40:24.000000000 +0200 +++ new/CGI-4.50/lib/CGI/Carp.pm 2020-06-22 09:30:45.000000000 +0200 @@ -326,7 +326,7 @@ $main::SIG{__WARN__}=\&CGI::Carp::warn; -$CGI::Carp::VERSION = '4.49'; +$CGI::Carp::VERSION = '4.50'; $CGI::Carp::CUSTOM_MSG = undef; $CGI::Carp::DIE_HANDLER = undef; $CGI::Carp::TO_BROWSER = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/Cookie.pm new/CGI-4.50/lib/CGI/Cookie.pm --- old/CGI-4.49/lib/CGI/Cookie.pm 2020-06-08 11:40:29.000000000 +0200 +++ new/CGI-4.50/lib/CGI/Cookie.pm 2020-06-22 09:30:51.000000000 +0200 @@ -3,7 +3,7 @@ use strict; use warnings; -our $VERSION='4.49'; +our $VERSION='4.50'; use CGI::Util qw(rearrange unescape escape); use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback' => 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/File/Temp.pm new/CGI-4.50/lib/CGI/File/Temp.pm --- old/CGI-4.49/lib/CGI/File/Temp.pm 2020-06-08 11:40:22.000000000 +0200 +++ new/CGI-4.50/lib/CGI/File/Temp.pm 2020-06-22 09:30:43.000000000 +0200 @@ -3,7 +3,7 @@ # you use it directly and your code breaks horribly. package CGI::File::Temp; -$CGI::File::Temp::VERSION = '4.49'; +$CGI::File::Temp::VERSION = '4.50'; use parent File::Temp; use parent Fh; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/Pretty.pm new/CGI-4.50/lib/CGI/Pretty.pm --- old/CGI-4.49/lib/CGI/Pretty.pm 2020-06-08 11:40:31.000000000 +0200 +++ new/CGI-4.50/lib/CGI/Pretty.pm 2020-06-22 09:30:52.000000000 +0200 @@ -5,7 +5,7 @@ use CGI (); -$CGI::Pretty::VERSION = '4.49'; +$CGI::Pretty::VERSION = '4.50'; $CGI::DefaultClass = __PACKAGE__; @CGI::Pretty::ISA = qw( CGI ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/Push.pm new/CGI-4.50/lib/CGI/Push.pm --- old/CGI-4.49/lib/CGI/Push.pm 2020-06-08 11:40:33.000000000 +0200 +++ new/CGI-4.50/lib/CGI/Push.pm 2020-06-22 09:30:54.000000000 +0200 @@ -5,7 +5,7 @@ use warnings; #/; -$CGI::Push::VERSION='4.49'; +$CGI::Push::VERSION='4.50'; use CGI; use CGI::Util 'rearrange'; @ISA = ('CGI'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI/Util.pm new/CGI-4.50/lib/CGI/Util.pm --- old/CGI-4.49/lib/CGI/Util.pm 2020-06-08 11:40:26.000000000 +0200 +++ new/CGI-4.50/lib/CGI/Util.pm 2020-06-22 09:30:49.000000000 +0200 @@ -5,7 +5,7 @@ our @EXPORT_OK = qw(rearrange rearrange_header make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic); -our $VERSION = '4.49'; +our $VERSION = '4.50'; our $_EBCDIC = "\t" ne "\011"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI.pm new/CGI-4.50/lib/CGI.pm --- old/CGI-4.49/lib/CGI.pm 2020-06-08 11:40:39.000000000 +0200 +++ new/CGI-4.50/lib/CGI.pm 2020-06-22 09:31:06.000000000 +0200 @@ -7,7 +7,7 @@ use warnings; #/; -$CGI::VERSION='4.49'; +$CGI::VERSION='4.50'; use CGI::Util qw(rearrange rearrange_header make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic); @@ -90,6 +90,9 @@ # make param('PUTDATA') act like file upload $PUTDATA_UPLOAD = 0; + # Add QUERY_STRING to POST request + $APPEND_QUERY_STRING = 0; + # Other globals that you shouldn't worry about. undef $Q; $BEEN_THERE = 0; @@ -553,6 +556,12 @@ ) { my($boundary) = $ENV{'CONTENT_TYPE'} =~ /boundary=\"?([^\";,]+)\"?/; $self->read_multipart($boundary,$content_length); + if ($APPEND_QUERY_STRING) { + # Some people want to have their cake and eat it too! + # Set $APPEND_QUERY_STRING = 1 to have the contents of the query string + # APPENDED to the POST data. + $query_string .= (length($query_string) ? '&' : '') . $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'}; + } last METHOD; } @@ -651,10 +660,12 @@ $self->read_from_client(\$query_string,$content_length,0); } } - # Some people want to have their cake and eat it too! - # Uncomment this line to have the contents of the query string - # APPENDED to the POST data. - # $query_string .= (length($query_string) ? '&' : '') . $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'}; + if ($APPEND_QUERY_STRING) { + # Some people want to have their cake and eat it too! + # Set $APPEND_QUERY_STRING = 1 to have the contents of the query string + # APPENDED to the POST data. + $query_string .= (length($query_string) ? '&' : '') . $ENV{'QUERY_STRING'} if defined $ENV{'QUERY_STRING'}; + } last METHOD; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/CGI.pod new/CGI-4.50/lib/CGI.pod --- old/CGI-4.49/lib/CGI.pod 2020-06-02 10:18:53.000000000 +0200 +++ new/CGI-4.50/lib/CGI.pod 2020-06-22 09:29:09.000000000 +0200 @@ -1718,6 +1718,22 @@ status code. It might be better just to create a page that warns the user of the problem. +=head1 MODULE FLAGS + +There are a number of global module flags which affect how CGI.pm operates. + +=over 4 + +=item B<$CGI::APPEND_QUERY_STRING> + +If set to a non-zero value, this will add query string parameters to a POST +forms parameters hence allowing I<param()> to return values from the query +string as well as from the decoded POST request instead of having to use +I<url_param> instead. This makes it easier to get the value of a parameter +when you don't know the source. + +=back + =head1 COMPATIBILITY WITH CGI-LIB.PL To make it easier to port existing programs that use cgi-lib.pl the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/lib/Fh.pm new/CGI-4.50/lib/Fh.pm --- old/CGI-4.49/lib/Fh.pm 2020-06-08 11:40:20.000000000 +0200 +++ new/CGI-4.50/lib/Fh.pm 2020-06-22 09:30:37.000000000 +0200 @@ -5,6 +5,6 @@ use strict; use warnings; -$Fh::VERSION = '4.49'; +$Fh::VERSION = '4.50'; 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.49/t/append_query.t new/CGI-4.50/t/append_query.t --- old/CGI-4.49/t/append_query.t 1970-01-01 01:00:00.000000000 +0100 +++ new/CGI-4.50/t/append_query.t 2020-06-22 09:29:09.000000000 +0200 @@ -0,0 +1,81 @@ +#!/usr/local/bin/perl + +use strict; +use warnings; + +use Test::More tests => 18; +use Test::Deep; + +use CGI (); +use Config; + +my $loaded = 1; + +$| = 1; + +######################### End of black magic. + +my $test_string = 'game=soccer&game=baseball&weather=nice'; + +# Set up a CGI environment +$ENV{REQUEST_METHOD} = 'POST'; +$ENV{QUERY_STRING} = 'big_balls=basketball&small_balls=golf'; +$ENV{PATH_INFO} = '/somewhere/else'; +$ENV{PATH_TRANSLATED} = '/usr/local/somewhere/else'; +$ENV{SCRIPT_NAME} = '/cgi-bin/foo.cgi'; +$ENV{SERVER_PROTOCOL} = 'HTTP/1.0'; +$ENV{SERVER_PORT} = 8080; +$ENV{SERVER_NAME} = 'the.good.ship.lollypop.com'; +$ENV{REQUEST_URI} = "$ENV{SCRIPT_NAME}$ENV{PATH_INFO}?$ENV{QUERY_STRING}"; +$ENV{HTTP_LOVE} = 'true'; +$ENV{CONTENT_LENGTH} = length($test_string); + +# APPEND_QUERY_STRING unset +{ + local *STDIN; + open STDIN, '<', \$test_string; + + my $q = CGI->new; + ok $q,"CGI::new()"; + is $q->param('weather'), 'nice',"CGI::param() from POST"; + is $q->param('big_balls'), undef, "CGI::param() from QUERY_STRING"; + is $q->param('small_balls'), undef,"CGI::param() from QUERY_STRING"; + is $q->url_param('big_balls'), 'basketball',"CGI::url_param()"; + is $q->url_param('small_balls'), 'golf',"CGI::url_param()"; +} + +# APPEND_QUERY_STRING = 0 +{ + CGI::_reset_globals; + + $CGI::APPEND_QUERY_STRING = 0; + + local *STDIN; + open STDIN, '<', \$test_string; + + my $q = CGI->new; + ok $q,"CGI::new()"; + is $q->param('weather'), 'nice',"CGI::param() from POST"; + is $q->param('big_balls'), undef, "CGI::param() from QUERY_STRING"; + is $q->param('small_balls'), undef,"CGI::param() from QUERY_STRING"; + is $q->url_param('big_balls'), 'basketball',"CGI::url_param()"; + is $q->url_param('small_balls'), 'golf',"CGI::url_param()"; +} + +# APPEND_QUERY_STRING = 1 +{ + CGI::_reset_globals; + + $CGI::APPEND_QUERY_STRING = 1; + + local *STDIN; + open STDIN, '<', \$test_string; + + my $q = CGI->new; + ok $q,"CGI::new()"; + is $q->param('weather'), 'nice',"CGI::param() from POST"; + is $q->param('big_balls'), 'basketball',"CGI::param() from QUERY_STRING"; + is $q->param('small_balls'), 'golf',"CGI::param() from QUERY_STRING"; + is $q->url_param('big_balls'), 'basketball',"CGI::url_param()"; + is $q->url_param('small_balls'), 'golf',"CGI::url_param()"; +}