Hello community,
here is the log from the commit of package perl-CGI for openSUSE:Factory checked in at 2016-06-19 10:47:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-CGI (Old)
and /work/SRC/openSUSE:Factory/.perl-CGI.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-CGI"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-CGI/perl-CGI.changes 2015-08-28 08:27:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-CGI.new/perl-CGI.changes 2016-06-19 10:47:55.000000000 +0200
@@ -1,0 +2,99 @@
+Sun Jun 12 12:26:04 UTC 2016 - coolo@suse.com
+
+- updated to 4.30
+ see /usr/share/doc/packages/perl-CGI/Changes
+
+ 4.30 2016-06-08
+
+ [ FEATURES ]
+ - Add SameSite support to Cookie handling (thanks to pangyre)
+
+ [ INTERNALS ]
+ - The MultipartBuffer package has been renamed to CGI::MultipartBuffer.
+ This has been done in a way to ensure any $MultipartBuffer package
+ variables are still set correctly in CGI::MultipartBuffer. if you are
+ explicitly using MultipartBuffer in a form such as:
+
+ MultipartBuffer->new
+
+ your code will break. you should be calling:
+
+ CGI->new->new_MultipartBuffer( $boundary,$length );
+
+ to ensure the correctly package is called. if you are extending the
+ MultipartBuffer package though use of ISA or base (or parent) then you
+ will need to update your code to use CGI::MultipartBuffer
+
+ - fake using strict and warnings to appease CPANTS Kwalitee
+
+ 4.28 2016-03-14
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ SPEC / BUG FIXES ]
+ - undef %QUERY_PARAM in initialize_globals to clean mod_perl env
+
+ [ TESTING ]
+ - improve test coverage on request types (GH #199, GH #200)
+ - improve test coverage on CGI::Carp
+
+ 4.27 2016-03-02
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ INTERNALS ]
+ - fix a couple of warnings in test harness
+ - add taint flag to example file_upload
+ - fix a warnings in STORE subroutine
+
+ 4.26 2016-02-04
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ SPEC / BUG FIXES ]
+ - sort HTML attributes by default (GH #106, GH #196)
+
+ [ DOCUMENTATION ]
+ - clarifications about HTML function non removal
+
+ 4.25 2015-12-17
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ DOCUMENTATION ]
+ - fix link to CONTRIBUTING file (thanks to Manwar for the fix)
+ - clarify that "soft" deprecation means that the HTML functions
+ are deprecated but will not raise any deprecation warnings
+
+ [ SPEC / BUG FIXES ]
+ - make the list context warning only happen once per process (or
+ thread) to prevent excessive log noise in long running or in
+ persistent processes (thanks to @dadamail for the suggestion)
+
+ 4.23 2015-12-17
+
+ [ RELEASE NOTES ]
+ - Documentation fixes only - please see v4.21 Changes for any potentially
+ impacting changes
+
+ [ DOCUMENTATION ]
+ - add LICENSE file and LICENSE info to Makefile.PL
+
+ 4.22 2015-10-16
+
+ [ RELEASE NOTES ]
+ - Documentation fixes only - please see v4.21 Changes for any potentially
+ impacting changes
+
+ [ DOCUMENTATION ]
+ - fix typos in CONTRIBUTING file
+ - links to docs, stackoverflow and perlmonks
+ - clarify deprecation policy on HTML functions (GH #188)
+ - mention HTML::Tiny in CGI::HTML::Functions (thanks to osfameron for
+ the suggestion)
+
+-------------------------------------------------------------------
Old:
----
CGI-4.21.tar.gz
New:
----
CGI-4.30.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-CGI.spec ++++++
--- /var/tmp/diff_new_pack.ptwiID/_old 2016-06-19 10:47:56.000000000 +0200
+++ /var/tmp/diff_new_pack.ptwiID/_new 2016-06-19 10:47:56.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-CGI
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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,24 +17,28 @@
Name: perl-CGI
-Version: 4.21
+Version: 4.30
Release: 0
%define cpan_name CGI
Summary: Handle Common Gateway Interface requests and responses
-License: Artistic-2.0 or GPL-1.0+
+License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/CGI/
-Source: http://www.cpan.org/authors/id/L/LE/LEEJO/%{cpan_name}-%{version}.tar.gz
+Source0: http://www.cpan.org/authors/id/L/LE/LEEJO/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(HTML::Entities) >= 3.69
BuildRequires: perl(Test::Deep) >= 0.11
-BuildRequires: perl(Test::NoWarnings) >= 1.04
-BuildRequires: perl(Test::Warn) >= 0.30
+BuildRequires: perl(Test::More) >= 0.98
+BuildRequires: perl(Test::Warn) >= 0.3
BuildRequires: perl(parent) >= 0.225
Requires: perl(HTML::Entities) >= 3.69
+Requires: perl(Test::Deep) >= 0.11
+Requires: perl(Test::More) >= 0.98
+Requires: perl(Test::Warn) >= 0.3
Requires: perl(parent) >= 0.225
%{perl_requires}
@@ -54,7 +58,7 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@@ -70,6 +74,6 @@
%files -f %{name}.files
%defattr(-,root,root,755)
-%doc Changes examples README.md
+%doc Changes examples LICENSE README.md
%changelog
++++++ CGI-4.21.tar.gz -> CGI-4.30.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/Changes new/CGI-4.30/Changes
--- old/CGI-4.21/Changes 2015-06-16 08:42:01.000000000 +0200
+++ new/CGI-4.30/Changes 2016-06-09 14:09:54.000000000 +0200
@@ -1,8 +1,101 @@
+4.30 2016-06-08
+
+ [ FEATURES ]
+ - Add SameSite support to Cookie handling (thanks to pangyre)
+
+ [ INTERNALS ]
+ - The MultipartBuffer package has been renamed to CGI::MultipartBuffer.
+ This has been done in a way to ensure any $MultipartBuffer package
+ variables are still set correctly in CGI::MultipartBuffer. if you are
+ explicitly using MultipartBuffer in a form such as:
+
+ MultipartBuffer->new
+
+ your code will break. you should be calling:
+
+ CGI->new->new_MultipartBuffer( $boundary,$length );
+
+ to ensure the correctly package is called. if you are extending the
+ MultipartBuffer package though use of ISA or base (or parent) then you
+ will need to update your code to use CGI::MultipartBuffer
+
+ - fake using strict and warnings to appease CPANTS Kwalitee
+
+4.28 2016-03-14
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ SPEC / BUG FIXES ]
+ - undef %QUERY_PARAM in initialize_globals to clean mod_perl env
+
+ [ TESTING ]
+ - improve test coverage on request types (GH #199, GH #200)
+ - improve test coverage on CGI::Carp
+
+4.27 2016-03-02
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ INTERNALS ]
+ - fix a couple of warnings in test harness
+ - add taint flag to example file_upload
+ - fix a warnings in STORE subroutine
+
+4.26 2016-02-04
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ SPEC / BUG FIXES ]
+ - sort HTML attributes by default (GH #106, GH #196)
+
+ [ DOCUMENTATION ]
+ - clarifications about HTML function non removal
+
+4.25 2015-12-17
+
+ [ RELEASE NOTES ]
+ - please see v4.21 Changes for any potentially impacting changes
+
+ [ DOCUMENTATION ]
+ - fix link to CONTRIBUTING file (thanks to Manwar for the fix)
+ - clarify that "soft" deprecation means that the HTML functions
+ are deprecated but will not raise any deprecation warnings
+
+ [ SPEC / BUG FIXES ]
+ - make the list context warning only happen once per process (or
+ thread) to prevent excessive log noise in long running or in
+ persistent processes (thanks to @dadamail for the suggestion)
+
+4.23 2015-12-17
+
+ [ RELEASE NOTES ]
+ - Documentation fixes only - please see v4.21 Changes for any potentially
+ impacting changes
+
+ [ DOCUMENTATION ]
+ - add LICENSE file and LICENSE info to Makefile.PL
+
+4.22 2015-10-16
+
+ [ RELEASE NOTES ]
+ - Documentation fixes only - please see v4.21 Changes for any potentially
+ impacting changes
+
+ [ DOCUMENTATION ]
+ - fix typos in CONTRIBUTING file
+ - links to docs, stackoverflow and perlmonks
+ - clarify deprecation policy on HTML functions (GH #188)
+ - mention HTML::Tiny in CGI::HTML::Functions (thanks to osfameron for
+ the suggestion)
+
4.21 2015-06-16
[ RELEASE NOTES ]
- CGI.pm is now considered "done". See also "mature" and "legacy"
- Features requests and none critical issues will be outright rejected.
+ Features requests and non-critical issues will be outright rejected.
The module is now in maintenance mode for critical issues only.
- This release removes the AUTOLOAD and compile optimisations from CGI.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/LICENSE new/CGI-4.30/LICENSE
--- old/CGI-4.21/LICENSE 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/LICENSE 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,2 @@
+The CGI.pm distribution is copyright 1995-2007, Lincoln D. Stein. It is
+distributed under GPL and the Artistic License 2.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/MANIFEST new/CGI-4.30/MANIFEST
--- old/CGI-4.21/MANIFEST 2015-06-16 08:44:29.000000000 +0200
+++ new/CGI-4.30/MANIFEST 2016-06-09 14:10:40.000000000 +0200
@@ -17,6 +17,7 @@
lib/CGI/File/Temp.pm
lib/CGI/HTML/Functions.pm
lib/CGI/HTML/Functions.pod
+LICENSE
Makefile.PL
MANIFEST This list of files
README.md
@@ -51,6 +52,7 @@
t/http.t
t/init.t
t/init_test.txt
+t/multipart_globals.t
t/multipart_init.t
t/multipart_start.t
t/no_tabindex.t
@@ -84,5 +86,12 @@
t/utf8.t
t/util-58.t
t/util.t
+t/APR/Pool.pm
+t/Apache.pm
+t/Apache2/RequestIO.pm
+t/Apache2/RequestRec.pm
+t/Apache2/RequestUtil.pm
+t/Apache2/Response.pm
+t/ModPerl/Util.pm
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/META.json new/CGI-4.30/META.json
--- old/CGI-4.21/META.json 2015-06-16 08:44:29.000000000 +0200
+++ new/CGI-4.30/META.json 2016-06-09 14:10:40.000000000 +0200
@@ -4,9 +4,9 @@
"unknown"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001",
+ "generated_by" : "ExtUtils::MakeMaker version 7.1001, CPAN::Meta::Converter version 2.150005",
"license" : [
- "unknown"
+ "perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
@@ -31,11 +31,19 @@
"requires" : {
"Carp" : "0",
"Config" : "0",
+ "Cwd" : "0",
"Encode" : "0",
"Exporter" : "0",
+ "File::Find" : "0",
"File::Spec" : "0.82",
"File::Temp" : "0",
"HTML::Entities" : "3.69",
+ "IO::File" : "0",
+ "IO::Handle" : "0",
+ "POSIX" : "0",
+ "Test::Deep" : "0.11",
+ "Test::More" : "0.98",
+ "Test::Warn" : "0.3",
"base" : "0",
"if" : "0",
"overload" : "0",
@@ -60,5 +68,6 @@
"url" : "https://github.com/leejo/CGI.pm"
}
},
- "version" : "4.21"
+ "version" : "4.30",
+ "x_serialization_backend" : "JSON::PP version 2.27300"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/META.yml new/CGI-4.30/META.yml
--- old/CGI-4.21/META.yml 2015-06-16 08:44:29.000000000 +0200
+++ new/CGI-4.30/META.yml 2016-06-09 14:10:40.000000000 +0200
@@ -5,8 +5,8 @@
build_requires: {}
configure_requires: {}
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter version 2.150001'
-license: unknown
+generated_by: 'ExtUtils::MakeMaker version 7.1001, CPAN::Meta::Converter version 2.150005'
+license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
@@ -19,11 +19,19 @@
requires:
Carp: '0'
Config: '0'
+ Cwd: '0'
Encode: '0'
Exporter: '0'
+ File::Find: '0'
File::Spec: '0.82'
File::Temp: '0'
HTML::Entities: '3.69'
+ IO::File: '0'
+ IO::Handle: '0'
+ POSIX: '0'
+ Test::Deep: '0.11'
+ Test::More: '0.98'
+ Test::Warn: '0.3'
base: '0'
if: '0'
overload: '0'
@@ -37,4 +45,5 @@
homepage: https://metacpan.org/module/CGI
license: http://dev.perl.org/licenses/
repository: https://github.com/leejo/CGI.pm
-version: '4.21'
+version: '4.30'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/Makefile.PL new/CGI-4.30/Makefile.PL
--- old/CGI-4.21/Makefile.PL 2015-04-17 15:27:46.000000000 +0200
+++ new/CGI-4.30/Makefile.PL 2016-05-23 09:58:56.000000000 +0200
@@ -9,6 +9,7 @@
VERSION_FROM => 'lib/CGI.pm',
NAME => 'CGI',
DISTNAME => 'CGI',
+ LICENSE => 'perl_5',
VERSION_FROM => 'lib/CGI.pm',
MIN_PERL_VERSION => '5.8.1',
PREREQ_PM => {
@@ -26,17 +27,14 @@
'HTML::Entities' => 3.69,
'Encode' => 0, # Encode was first released with perl v5.7.3
'Config' => 0, # Config was first released with perl 5.00307
- },
- TEST_REQUIRES => {
- 'Cwd' => 0, # Cwd was first released with perl 5
- 'POSIX' => 0, # POSIX was first released with perl 5
- 'IO::File' => 0, # IO::File was first released with perl 5.00307
- 'IO::Handle' => 0, # IO::Handle was first released with perl 5.00307
- 'File::Find' => 0, # File::Find was first released with perl 5
- 'Test::Deep' => 0.11,
- 'Test::More' => 0.98,
- 'Test::Warn' => 0.30,
- 'Test::NoWarnings' => 1.04,
+ 'Test::Deep' => 0.11,
+ 'Cwd' => 0, # Cwd was first released with perl 5
+ 'POSIX' => 0, # POSIX was first released with perl 5
+ 'IO::File' => 0, # IO::File was first released with perl 5.00307
+ 'IO::Handle' => 0, # IO::Handle was first released with perl 5.00307
+ 'File::Find' => 0, # File::Find was first released with perl 5
+ 'Test::More' => 0.98,
+ 'Test::Warn' => 0.30,
},
test => { TESTS => 't/*.t t/headers/*.t' },
linkext => { LINKTYPE => '' }, # no link needed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/README.md new/CGI-4.30/README.md
--- old/CGI-4.21/README.md 2015-06-16 08:37:34.000000000 +0200
+++ new/CGI-4.30/README.md 2016-05-23 09:58:56.000000000 +0200
@@ -103,9 +103,12 @@
See [CGI::Alternatives](https://metacpan.org/pod/CGI::Alternatives) for an example of using CGI.pm with the
[Template::Toolkit](https://metacpan.org/pod/Template::Toolkit) module.
-These functions, and perldoc for them, will continue to exist in the
-v4 releases of CGI.pm but may be deprecated (soft) in v5 and beyond.
-All documentation for these functions has been moved to [CGI::HTML::Functions](https://metacpan.org/pod/CGI::HTML::Functions).
+These functions, and perldoc for them, are considered deprecated, they
+are no longer being maintained and no fixes or features for them will be
+accepted. They will, however, continue to exist in CGI.pm without any
+deprecation warnings ("soft" deprecation) so you can continue to use
+them if you really want to. All documentation for these functions has
+been moved to [CGI::HTML::Functions](https://metacpan.org/pod/CGI::HTML::Functions).
# Programming style
@@ -1531,7 +1534,7 @@
CGI.pm provides four simple functions for producing multipart documents of the
type needed to implement server push. These functions were graciously provided
-by Ed Jordan . To import these into your namespace, you must
+by Ed Jordan <ed@fidalgo.net>. To import these into your namespace, you must
import the ":push" set. You are also advised to put the script into NPH mode
and to set $| to 1 to avoid buffering problems.
@@ -1655,7 +1658,7 @@
An attempt to send a POST larger than $POST\_MAX bytes will cause _param()_ to
return an empty CGI parameter list. You can test for this event by checking
_cgi\_error()_, either after you create the CGI object or, if you are using the
-function-oriented interface, call for the first time. If the POST was
+function-oriented interface, call <param()> for the first time. If the POST was
intercepted, then cgi\_error() will return the message "413 POST too large".
This error message is actually defined by the HTTP protocol, and is designed to
@@ -1732,7 +1735,7 @@
- Mark Stosberg (mark@stosberg.com)
- Matt Heffron (heffron@falstaff.css.beckman.com)
- James Taylor (james.taylor@srs.gov)
-- Scott Anguish
+- Scott Anguish <sanguish@digifix.com>
- Mike Jewell (mlj3u@virginia.edu)
- Timothy Shimmin (tes@kbs.citri.edu.au)
- Joergen Haegg (jh@axis.se)
@@ -1758,22 +1761,12 @@
Address bug reports and comments to: [https://github.com/leejo/CGI.pm/issues](https://github.com/leejo/CGI.pm/issues)
+See the [https://github.com/leejo/CGI.pm/blob/master/CONTRIBUTING.md](https://github.com/leejo/CGI.pm/blob/master/CONTRIBUTING.md) file for information
+on raising issues and contributing
+
The original bug tracker can be found at:
[https://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm](https://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm)
-When sending bug reports, please provide the version of CGI.pm, the version of
-perl, the name and version of your Web server, and the name and version of the
-operating system you are using. If the problem is even remotely browser
-dependent, please provide information about the affected browsers as well.
-
-Failing tests cases are appreciated with issues, and if you submit a patch then
-it will \*not\* be accepted unless you provide a reasonable automated test case
-with it (please see the existing tests in t/ for examples).
-
-Please note the CGI.pm is now considered "done". See also "mature" and "legacy".
-Feature requests and none critical issues will be outright rejected. The module
-is now in maintenance mode for critical issues only.
-
# SEE ALSO
[CGI::Carp](https://metacpan.org/pod/CGI::Carp) - provides [Carp](https://metacpan.org/pod/Carp) implementation tailored to the CGI environment.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/examples/file_upload.cgi new/CGI-4.30/examples/file_upload.cgi
--- old/CGI-4.21/examples/file_upload.cgi 2015-04-17 14:38:29.000000000 +0200
+++ new/CGI-4.30/examples/file_upload.cgi 2016-05-23 09:58:56.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#!/usr/bin/env perl -T
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/Carp.pm new/CGI-4.30/lib/CGI/Carp.pm
--- old/CGI-4.21/lib/CGI/Carp.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/Carp.pm 2016-06-09 14:06:57.000000000 +0200
@@ -1,6 +1,11 @@
package CGI::Carp;
use if $] >= 5.019, 'deprecate';
+my $appease_cpants_kwalitee = q/
+use strict;
+use warnings;
+#/;
+
=head1 NAME
BCGI::Carp - CGI routines for writing to the HTTPD (or other) error log
@@ -322,7 +327,7 @@
$main::SIG{__WARN__}=\&CGI::Carp::warn;
-$CGI::Carp::VERSION = '4.21';
+$CGI::Carp::VERSION = '4.30';
$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.21/lib/CGI/Cookie.pm new/CGI-4.30/lib/CGI/Cookie.pm
--- old/CGI-4.21/lib/CGI/Cookie.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/Cookie.pm 2016-06-09 14:07:03.000000000 +0200
@@ -5,7 +5,7 @@
use if $] >= 5.019, 'deprecate';
-our $VERSION='4.21';
+our $VERSION='4.30';
use CGI::Util qw(rearrange unescape escape);
use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback' => 1;
@@ -106,13 +106,13 @@
# Ignore mod_perl request object--compatibility with Apache::Cookie.
shift if ref $params[0]
&& eval { $params[0]->isa('Apache::Request::Req') || $params[0]->isa('Apache') };
- my ( $name, $value, $path, $domain, $secure, $expires, $max_age, $httponly )
+ my ( $name, $value, $path, $domain, $secure, $expires, $max_age, $httponly, $samesite )
= rearrange(
[
'NAME', [ 'VALUE', 'VALUES' ],
'PATH', 'DOMAIN',
'SECURE', 'EXPIRES',
- 'MAX-AGE','HTTPONLY'
+ 'MAX-AGE','HTTPONLY','SAMESITE'
],
@params
);
@@ -128,6 +128,7 @@
$self->expires( $expires ) if defined $expires;
$self->max_age( $max_age ) if defined $max_age;
$self->httponly( $httponly ) if defined $httponly;
+ $self->samesite( $samesite ) if defined $samesite;
return $self;
}
@@ -141,12 +142,13 @@
my $value = join "&", map { escape($_) } $self->value;
my @cookie = ( "$name=$value" );
- push @cookie,"domain=".$self->domain if $self->domain;
- push @cookie,"path=".$self->path if $self->path;
- push @cookie,"expires=".$self->expires if $self->expires;
- push @cookie,"max-age=".$self->max_age if $self->max_age;
- push @cookie,"secure" if $self->secure;
- push @cookie,"HttpOnly" if $self->httponly;
+ push @cookie,"domain=".$self->domain if $self->domain;
+ push @cookie,"path=".$self->path if $self->path;
+ push @cookie,"expires=".$self->expires if $self->expires;
+ push @cookie,"max-age=".$self->max_age if $self->max_age;
+ push @cookie,"secure" if $self->secure;
+ push @cookie,"HttpOnly" if $self->httponly;
+ push @cookie,"SameSite=".$self->samesite if $self->samesite;
return join "; ", @cookie;
}
@@ -222,13 +224,20 @@
return $self->{'path'};
}
-
sub httponly { # HttpOnly
my ( $self, $httponly ) = @_;
$self->{'httponly'} = $httponly if defined $httponly;
return $self->{'httponly'};
}
+my %_legal_samesite = ( Strict => 1, Lax => 1 );
+sub samesite { # SameSite
+ my $self = shift;
+ my $samesite = ucfirst lc +shift if @_; # Normalize casing.
+ $self->{'samesite'} = $samesite if $samesite and $_legal_samesite{$samesite};
+ return $self->{'samesite'};
+}
+
1;
=head1 NAME
@@ -328,6 +337,14 @@
http://msdn.microsoft.com/en-us/library/ms533046.aspx
http://www.browserscope.org/?category=security&v=top
+=item B<6. samesite flag>
+
+Allowed settings are C<Strict> and C<Lax>.
+
+As of June 2016, support is limited to recent releases of Chrome and Opera.
+
+Lhttps://tools.ietf.org/html/draft-west-first-party-cookies-07
+
=back
=head2 Creating New Cookies
@@ -338,7 +355,8 @@
'-max-age' => '+3M',
-domain => '.capricorn.com',
-path => '/cgi-bin/database',
- -secure => 1
+ -secure => 1,
+ -samesite=> "Lax"
);
Create cookies from scratch with the B<new> method. The B<-name> and
@@ -374,6 +392,9 @@
B<-httponly> if set to a true value, the cookie will not be accessible
via JavaScript.
+B<-samesite> may be C<Lax> or C<Strict> and is an evolving part of the
+standards for cookies. Please refer to current documentation regarding it.
+
For compatibility with Apache::Cookie, you may optionally pass in
a mod_perl request object as the first argument to C. It will
simply be ignored:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/File/Temp.pm new/CGI-4.30/lib/CGI/File/Temp.pm
--- old/CGI-4.21/lib/CGI/File/Temp.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/File/Temp.pm 2016-06-09 14:07:09.000000000 +0200
@@ -3,11 +3,16 @@
# you use it directly and your code breaks horribly.
package CGI::File::Temp;
-$CGI::File::Temp::VERSION = '4.21';
+$CGI::File::Temp::VERSION = '4.30';
use parent File::Temp;
use parent Fh;
+my $appease_cpants_kwalitee = q/
+use strict;
+use warnings;
+#/;
+
use overload
'""' => \&asString,
'cmp' => \&compare,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/HTML/Functions.pod new/CGI-4.30/lib/CGI/HTML/Functions.pod
--- old/CGI-4.21/lib/CGI/HTML/Functions.pod 2015-04-24 09:36:41.000000000 +0200
+++ new/CGI-4.30/lib/CGI/HTML/Functions.pod 2016-05-23 09:58:56.000000000 +0200
@@ -6,13 +6,17 @@
Nothing here - please do not use this functionality, it is considered to
be legacy and essentially deprecated. This documentation exists solely to
-aid in maintenance and migration of legacy code using this functionality.
-
-This functionality is likely to be removed in future versions of CGI.pm so
-you are strongly encouraged to migrate away from it. If you are working
+aid in maintenance and migration of legacy code using this functionality
+and you are strongly encouraged to migrate away from it. If you are working
on new code you should be using a template engine. For more information see
LCGI::Alternatives.
+If you really want to continue using the HTML generation functionality of CGI.pm
+then you should take a look at LHTML::Tiny instead, which may give you a migration
+path away from CGI.pm's html generation functions; i strongly encourage you to
+move towards template driven page generation for anything involving markup as
+it will make porting your app to other frameworks much easier in the long run.
+
=head1 DESCRIPTION
The documentation here should be considered an addendum to the sections in the
@@ -1912,13 +1916,11 @@
Address bug reports and comments to: Lhttps://github.com/leejo/CGI.pm/issues
-The original bug tracker can be found at: Lhttps://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm
+See the Lhttps://github.com/leejo/CGI.pm/blob/master/CONTRIBUTING.md file for information
+on raising issues and contributing
-However as stated this functionality is no longer being maintained and is
-considered deprecated. Any feature requests, bug reports, issues, pull
-requests, etc, for this functionality will almost certainly be rejected without
-any action being taken place - this includes fixes to utterly broken page
-rendering, invalid HTML, nonsensical output, and annoyances.
+The original bug tracker can be found at:
+Lhttps://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm
=head1 SEE ALSO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/Pretty.pm new/CGI-4.30/lib/CGI/Pretty.pm
--- old/CGI-4.21/lib/CGI/Pretty.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/Pretty.pm 2016-06-09 14:08:36.000000000 +0200
@@ -1,10 +1,12 @@
package CGI::Pretty;
use strict;
+use warnings;
+
use if $] >= 5.019, 'deprecate';
use CGI ();
-$CGI::Pretty::VERSION = '4.21';
+$CGI::Pretty::VERSION = '4.30';
$CGI::DefaultClass = __PACKAGE__;
@CGI::Pretty::ISA = qw( CGI );
@@ -62,10 +64,6 @@
LHTML::HTML5::Parser + LHTML::HTML5::Writer + LXML::LibXML::PrettyPrint:
- use HTML::HTML5::Parser qw();
- use HTML::HTML5::Writer qw();
- use XML::LibXML::PrettyPrint qw();
-
print HTML::HTML5::Writer->new(
start_tags => 'force',
end_tags => 'force',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/Push.pm new/CGI-4.30/lib/CGI/Push.pm
--- old/CGI-4.21/lib/CGI/Push.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/Push.pm 2016-06-09 14:08:43.000000000 +0200
@@ -1,7 +1,12 @@
package CGI::Push;
use if $] >= 5.019, 'deprecate';
-$CGI::Push::VERSION='4.21';
+my $appease_cpants_kwalitee = q/
+use strict;
+use warnings;
+#/;
+
+$CGI::Push::VERSION='4.30';
use CGI;
use CGI::Util 'rearrange';
@ISA = ('CGI');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI/Util.pm new/CGI-4.30/lib/CGI/Util.pm
--- old/CGI-4.21/lib/CGI/Util.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI/Util.pm 2016-06-09 14:08:52.000000000 +0200
@@ -6,14 +6,14 @@
our @EXPORT_OK = qw(rearrange rearrange_header make_attributes unescape escape
expires ebcdic2ascii ascii2ebcdic);
-our $VERSION = '4.21';
+our $VERSION = '4.30';
our $_EBCDIC = "\t" ne "\011";
-# This option is not documented and may change or go away.
-# The HTML spec does not require attributes to be sorted,
-# but it's useful for testing to get a predictable order back.
-our $SORT_ATTRIBUTES;
+my $appease_cpants_kwalitee = q/
+use strict;
+use warnings;
+#/;
# (ord('^') == 95) for codepage 1047 as on os390, vmesa
our @A2E = (
@@ -150,10 +150,7 @@
my $quote = $do_not_quote ? '' : '"';
- my @attr_keys= keys %$attr;
- if ($SORT_ATTRIBUTES) {
- @attr_keys= sort @attr_keys;
- }
+ my @attr_keys= sort keys %$attr;
my(@att);
foreach (@attr_keys) {
my($key) = $_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/CGI.pm new/CGI-4.30/lib/CGI.pm
--- old/CGI-4.21/lib/CGI.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/CGI.pm 2016-06-09 14:06:50.000000000 +0200
@@ -3,7 +3,12 @@
use if $] >= 5.019, 'deprecate';
use Carp 'croak';
-$CGI::VERSION='4.21';
+my $appease_cpants_kwalitee = q/
+use strict;
+use warnings;
+#/;
+
+$CGI::VERSION='4.30';
use CGI::Util qw(rearrange rearrange_header make_attributes unescape escape expires ebcdic2ascii ascii2ebcdic);
@@ -23,6 +28,7 @@
$UNLINK_TMP_FILES = 1;
$LIST_CONTEXT_WARN = 1;
$ENCODE_ENTITIES = q{&<>"'};
+$ALLOW_DELETE_CONTENT = 0;
@SAVED_SYMBOLS = ();
@@ -90,6 +96,7 @@
$BEEN_THERE = 0;
$DTD_PUBLIC_IDENTIFIER = "";
undef @QUERY_PARAM;
+ undef %QUERY_PARAM;
undef %EXPORT;
undef $QUERY_CHARSET;
undef %QUERY_FIELDNAMES;
@@ -398,9 +405,10 @@
# list context can be dangerous so warn:
# http://blog.gerv.net/2014.10/new-class-of-vulnerability-in-perl-web-applicat...
- if ( wantarray && $LIST_CONTEXT_WARN ) {
+ if ( wantarray && $LIST_CONTEXT_WARN == 1 ) {
my ( $package, $filename, $line ) = caller;
if ( $package ne 'CGI' ) {
+ $LIST_CONTEXT_WARN++; # only warn once
warn "CGI::param called in list context from $filename line $line, this can lead to vulnerabilities. "
. 'See the warning in "Fetching the value or values of a single named parameter"';
}
@@ -1003,7 +1011,7 @@
# while (defined($data = $buffer->read)) { }
my $buff;
- my $unit = $MultipartBuffer::INITIAL_FILLUNIT;
+ my $unit = $CGI::MultipartBuffer::INITIAL_FILLUNIT;
my $len = $content_length;
while ( $len > 0 ) {
my $read = $self->read_from_client( \$buf, $unit, 0 );
@@ -1032,7 +1040,7 @@
my ($data);
local ($\) = '';
my $totalbytes;
- my $unit = $MultipartBuffer::INITIAL_FILLUNIT;
+ my $unit = $CGI::MultipartBuffer::INITIAL_FILLUNIT;
my $len = $content_length;
$unit = $len;
my $ZERO_LOOP_COUNTER =0;
@@ -1098,7 +1106,7 @@
# Create a new multipart buffer
sub new_MultipartBuffer {
my($self,$boundary,$length) = @_;
- return MultipartBuffer->new($self,$boundary,$length);
+ return CGI::MultipartBuffer->new($self,$boundary,$length);
}
# Read data from a file handle
@@ -1240,7 +1248,7 @@
my $self = shift;
my $tag = shift;
my $vals = shift;
- my @vals = index($vals,"\0")!=-1 ? split("\0",$vals) : $vals;
+ my @vals = defined($vals) && index($vals,"\0")!=-1 ? split("\0",$vals) : $vals;
$self->param(-name=>$tag,-value=>\@vals);
}
@@ -3600,18 +3608,23 @@
# Globals and stubs for other packages that we use.
#########################################################
-######################## MultipartBuffer ####################
+######################## CGI::MultipartBuffer ####################
-package MultipartBuffer;
+package CGI::MultipartBuffer;
$_DEBUG = 0;
# how many bytes to read at a time. We use
# a 4K buffer by default.
-$INITIAL_FILLUNIT = 1024 * 4;
-$TIMEOUT = 240*60; # 4 hour timeout for big files
-$SPIN_LOOP_MAX = 2000; # bug fix for some Netscape servers
-$CRLF=$CGI::CRLF;
+$MultipartBuffer::INITIAL_FILLUNIT ||= 1024 * 4;
+$MultipartBuffer::TIMEOUT ||= 240*60; # 4 hour timeout for big files
+$MultipartBuffer::SPIN_LOOP_MAX ||= 2000; # bug fix for some Netscape servers
+$MultipartBuffer::CRLF ||= $CGI::CRLF;
+
+$INITIAL_FILLUNIT = $MultipartBuffer::INITIAL_FILLUNIT;
+$TIMEOUT = $MultipartBuffer::TIMEOUT;
+$SPIN_LOOP_MAX = $MultipartBuffer::SPIN_LOOP_MAX;
+$CRLF = $MultipartBuffer::CRLF;
sub new {
my($package,$interface,$boundary,$length) = @_;
@@ -3845,10 +3858,10 @@
$CGI::CGI = '';
$CGI::CGI=<CGI::Alternatives for an example of using CGI.pm with the
LTemplate::Toolkit module.
-These functions, and perldoc for them, will continue to exist in the
-v4 releases of CGI.pm but may be deprecated (soft) in v5 and beyond.
-All documentation for these functions has been moved to LCGI::HTML::Functions.
+These functions, and perldoc for them, are considered deprecated, they
+are no longer being maintained and no fixes or features for them will be
+accepted. They will, however, continue to exist in CGI.pm without any
+deprecation warnings ("soft" deprecation) so you can continue to use
+them if you really want to. All documentation for these functions has
+been moved to LCGI::HTML::Functions.
=head1 Programming style
@@ -134,8 +137,6 @@
my $q = CGI->new; # create new CGI object
print $q->header; # create the HTTP header
- ...
-
In the function-oriented style, there is one default CGI object that
you rarely deal with directly. Instead you just call functions to
retrieve CGI parameters, manage cookies, and so on. The following example
@@ -152,8 +153,6 @@
use CGI qw/:standard/; # load standard CGI routines
print header(); # create the HTTP header
- ...
-
The examples in this document mainly use the object-oriented style. See HOW
TO IMPORT FUNCTIONS for important information on function-oriented programming
in CGI.pm
@@ -1818,22 +1817,12 @@
Address bug reports and comments to: Lhttps://github.com/leejo/CGI.pm/issues
+See the Lhttps://github.com/leejo/CGI.pm/blob/master/CONTRIBUTING.md file for information
+on raising issues and contributing
+
The original bug tracker can be found at:
Lhttps://rt.cpan.org/Public/Dist/Display.html?Queue=CGI.pm
-When sending bug reports, please provide the version of CGI.pm, the version of
-perl, the name and version of your Web server, and the name and version of the
-operating system you are using. If the problem is even remotely browser
-dependent, please provide information about the affected browsers as well.
-
-Failing tests cases are appreciated with issues, and if you submit a patch then
-it will *not* be accepted unless you provide a reasonable automated test case
-with it (please see the existing tests in t/ for examples).
-
-Please note the CGI.pm is now considered "done". See also "mature" and "legacy".
-Feature requests and none critical issues will be outright rejected. The module
-is now in maintenance mode for critical issues only.
-
=head1 SEE ALSO
LCGI::Carp - provides L<Carp> implementation tailored to the CGI environment.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/lib/Fh.pm new/CGI-4.30/lib/Fh.pm
--- old/CGI-4.21/lib/Fh.pm 2015-06-16 08:40:30.000000000 +0200
+++ new/CGI-4.30/lib/Fh.pm 2016-06-09 14:09:02.000000000 +0200
@@ -2,6 +2,9 @@
# that the filehandle object is a Fh
package Fh;
-$Fh::VERSION = '4.21';
+use strict;
+use warnings;
+
+$Fh::VERSION = '4.30';
1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/APR/Pool.pm new/CGI-4.30/t/APR/Pool.pm
--- old/CGI-4.21/t/APR/Pool.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/APR/Pool.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,3 @@
+package APR::Pool;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/Apache.pm new/CGI-4.30/t/Apache.pm
--- old/CGI-4.21/t/Apache.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/Apache.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,10 @@
+package Apache;
+
+sub request {
+ return bless( {},shift );
+}
+
+sub bytes_sent { 0 };
+sub custom_response { $ENV{MOD_PERL_PRINTED} = $_[2] };
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/Apache2/RequestIO.pm new/CGI-4.30/t/Apache2/RequestIO.pm
--- old/CGI-4.21/t/Apache2/RequestIO.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/Apache2/RequestIO.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,3 @@
+package Apache2::RequestIO;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/Apache2/RequestRec.pm new/CGI-4.30/t/Apache2/RequestRec.pm
--- old/CGI-4.21/t/Apache2/RequestRec.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/Apache2/RequestRec.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,3 @@
+package Apache2::RequestRec;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/Apache2/RequestUtil.pm new/CGI-4.30/t/Apache2/RequestUtil.pm
--- old/CGI-4.21/t/Apache2/RequestUtil.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/Apache2/RequestUtil.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,11 @@
+package Apache2::RequestUtil;
+
+sub request {
+ return bless( {},shift );
+}
+
+sub bytes_sent { 1 };
+sub print { $ENV{MOD_PERL_PRINTED} = $_[1] };
+sub exit {};
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/Apache2/Response.pm new/CGI-4.30/t/Apache2/Response.pm
--- old/CGI-4.21/t/Apache2/Response.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/Apache2/Response.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,3 @@
+package Apache2::Response;
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/ModPerl/Util.pm new/CGI-4.30/t/ModPerl/Util.pm
--- old/CGI-4.21/t/ModPerl/Util.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/ModPerl/Util.pm 2016-05-23 09:58:56.000000000 +0200
@@ -0,0 +1,5 @@
+package ModPerl::Util;
+
+sub exit {};
+
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/autoescape.t new/CGI-4.30/t/autoescape.t
--- old/CGI-4.21/t/autoescape.t 2015-04-16 09:20:30.000000000 +0200
+++ new/CGI-4.30/t/autoescape.t 2016-05-23 09:58:56.000000000 +0200
@@ -6,7 +6,6 @@
use Test::More tests => 18;
use CGI qw/ autoEscape escapeHTML button textfield password_field textarea popup_menu scrolling_list checkbox_group optgroup checkbox radio_group submit image_button button /;
-$CGI::Util::SORT_ATTRIBUTES = 1;
is (button(-name => 'test<'), '<input type="button" name="test<" value="test<" />', "autoEscape defaults to On");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/carp.t new/CGI-4.30/t/carp.t
--- old/CGI-4.21/t/carp.t 2015-04-17 15:16:04.000000000 +0200
+++ new/CGI-4.30/t/carp.t 2016-05-23 09:58:56.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
-use Test::More tests => 71;
+use Test::More tests => 76;
use IO::Handle;
use CGI::Carp;
@@ -82,6 +82,7 @@
# Test that realwarn is called
{
local $^W = 0;
+ ok( CGI::Carp::realwarn( "foo" ),'realwarn' );
eval "sub CGI::Carp::realwarn {return 'Called realwarn'};";
}
@@ -254,6 +255,11 @@
CGI::Carp::fatalsToBrowser('Message to the world');
$result[3] .= $_ while (<STDOUT>);
+
+CGI::Carp::set_message(sub {print 'Override message with callback'}),
+CGI::Carp::fatalsToBrowser('Message to the world');
+$result[4] .= $_ while (<STDOUT>);
+
CGI::Carp::set_message(''),
delete $ENV{SERVER_ADMIN};
@@ -285,6 +291,10 @@
'/Override the message passed in/',
"Correct message in string");
+like($result[4],
+ '/Override message with callback/',
+ "Correct message in string");
+
#-----------------------------------------------------------------------------
# Test to_filehandle
#-----------------------------------------------------------------------------
@@ -438,3 +448,30 @@
my $fh = File::Temp->new;
ok( CGI::Carp::carpout( $fh ),'carpout' );
+
+# mod_perl nonsense
+$ENV{MOD_PERL} = 2;
+$ENV{MOD_PERL_API_VERSION} = 2;
+$ENV{HTTP_USER_AGENT} = "MSIE";
+
+use FindBin qw/ $Bin /;
+use lib $Bin;
+
+CGI::Carp::fatalsToBrowser();
+like($ENV{MOD_PERL_PRINTED},
+ qr/Software error/,
+ "fatalsToBrowser with mod_perl 2");
+
+$ENV{MOD_PERL} = 1;
+$ENV{MOD_PERL_API_VERSION} = 1;
+$ENV{MOD_PERL_PRINTED} = undef;
+
+use FindBin qw/ $Bin /;
+use lib $Bin;
+
+require Apache;
+CGI::Carp::fatalsToBrowser();
+ok( length( $ENV{MOD_PERL_PRINTED} ) > 512,'MSIE error length hack' );
+like($ENV{MOD_PERL_PRINTED},
+ qr/Software error/,
+ "fatalsToBrowser with mod_perl 1");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/cgi.t new/CGI-4.30/t/cgi.t
--- old/CGI-4.21/t/cgi.t 2015-04-17 16:17:52.000000000 +0200
+++ new/CGI-4.30/t/cgi.t 2016-05-23 09:58:56.000000000 +0200
@@ -7,7 +7,6 @@
use Test::More tests => 25;
use Test::Deep;
-use Test::Warn;
use CGI ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/compiles_pod.t new/CGI-4.30/t/compiles_pod.t
--- old/CGI-4.21/t/compiles_pod.t 2015-04-16 09:20:50.000000000 +0200
+++ new/CGI-4.30/t/compiles_pod.t 2016-06-09 13:58:57.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More;
+use Test::More qw/ no_plan /;
use File::Find;
if(($ENV{HARNESS_PERL_SWITCHES} || '') =~ /Devel::Cover/) {
@@ -26,10 +26,9 @@
-e 'blib' ? 'blib' : 'lib',
);
-plan tests => @files * 3;
-
for my $file (@files) {
my $module = $file; $module =~ s,\.pm$,,; $module =~ s,.*/?lib/,,; $module =~ s,/,::,g;
+ next if $module =~ /CGI::Pretty/;
ok eval "use $module; 1", "use $module" or diag $@;
Test::Pod::pod_file_ok($file);
TODO: {
@@ -37,6 +36,7 @@
# of CGI.pm at present (most subs eval'd as strings) means
# this test isn't that much use - so mark as TODO for now
local $TODO = 'POD coverage';
+ next if $module =~ /CGI::/;
Test::Pod::Coverage::pod_coverage_ok($module);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/cookie.t new/CGI-4.30/t/cookie.t
--- old/CGI-4.21/t/cookie.t 2015-04-16 09:20:30.000000000 +0200
+++ new/CGI-4.30/t/cookie.t 2016-06-09 13:58:57.000000000 +0200
@@ -156,7 +156,8 @@
-domain => '.capricorn.com',
-path => '/cgi-bin/database',
-secure => 1,
- -httponly=> 1
+ -httponly=> 1,
+ -samesite=> 'Lax'
);
is(ref($c), 'CGI::Cookie', 'new returns objects of correct type');
is($c->name , 'foo', 'name is correct');
@@ -166,6 +167,7 @@
is($c->path , '/cgi-bin/database', 'path is correct');
ok($c->secure , 'secure attribute is set');
ok( $c->httponly, 'httponly attribute is set' );
+ is( $c->samesite, 'Lax', 'samesite attribute is correct' );
# now try it with the only two manditory values (should also set the default path)
$c = CGI::Cookie->new(-name => 'baz',
@@ -180,6 +182,7 @@
is($c->path, '/', 'path atribute is set to default');
ok(!defined $c->secure , 'secure attribute is set');
ok( !defined $c->httponly, 'httponly attribute is not set' );
+ ok( !$c->samesite, 'samesite attribute is not set' );
# I'm really not happy about the restults of this section. You pass
# the new method invalid arguments and it just merilly creates a
@@ -212,7 +215,8 @@
-domain => '.pie-shop.com',
-path => '/',
-secure => 1,
- -httponly=> 1
+ -httponly=> 1,
+ -samesite=> 'strict'
);
my $name = $c->name;
@@ -238,6 +242,9 @@
like( $c->as_string, '/HttpOnly/',
"Stringified cookie contains HttpOnly" );
+ like( $c->as_string, '/SameSite=Strict/',
+ "Stringified cookie contains normalized SameSite" );
+
$c = CGI::Cookie->new(-name => 'Hamster-Jam',
-value => 'Tulip',
);
@@ -261,6 +268,9 @@
ok( $c->as_string !~ /HttpOnly/,
"Stringified cookie does not contain HttpOnly" );
+
+ ok( $c->as_string !~ /SameSite/,
+ "Stringified cookie does not contain SameSite" );
}
#-----------------------------------------------------------------------------
@@ -321,7 +331,8 @@
-expires => '+3M',
-domain => '.pie-shop.com',
-path => '/',
- -secure => 1
+ -secure => 1,
+ -samesite=> "strict"
);
is($c->name, 'Jam', 'name is correct');
@@ -352,6 +363,10 @@
ok($c->secure, 'secure attribute is set');
ok(!$c->secure(0), 'secure attribute is cleared');
ok(!$c->secure, 'secure attribute is cleared');
+
+ is($c->samesite, 'Strict', 'SameSite is correct');
+ is($c->samesite('Lax'), 'Lax', 'SameSite is set correctly');
+ is($c->samesite, 'Lax', 'SameSite now returns updated value');
}
#----------------------------------------------------------------------------
@@ -360,7 +375,7 @@
MAX_AGE: {
my $cookie = CGI::Cookie->new( -name=>'a', value=>'b', '-expires' => 'now',);
- is $cookie->expires, 'Thu, 01-Jan-1970 00:01:40 GMT';
+ is $cookie->expires, 'Thu, 01-Jan-1970 00:01:40 GMT', 'expires is correct';
is $cookie->max_age => undef, 'max-age is undefined when setting expires';
$cookie = CGI::Cookie->new( -name=>'a', 'value'=>'b' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/function.t new/CGI-4.30/t/function.t
--- old/CGI-4.21/t/function.t 2015-04-16 11:07:47.000000000 +0200
+++ new/CGI-4.30/t/function.t 2016-05-23 09:58:56.000000000 +0200
@@ -5,7 +5,6 @@
use Config;
use CGI (':standard','keywords');
$loaded = 1;
-$CGI::Util::SORT_ATTRIBUTES = 1;
$CGI::LIST_CONTEXT_WARN = 0;
print "ok 1\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/html.t new/CGI-4.30/t/html.t
--- old/CGI-4.21/t/html.t 2015-05-29 16:30:25.000000000 +0200
+++ new/CGI-4.30/t/html.t 2016-05-23 09:58:56.000000000 +0200
@@ -5,7 +5,6 @@
END { ok $loaded; }
use CGI ( ':standard', '-no_debug', '*h3', 'start_table' );
$loaded = 1;
-$CGI::Util::SORT_ATTRIBUTES= 1;
ok 1;
BEGIN {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/multipart_globals.t new/CGI-4.30/t/multipart_globals.t
--- old/CGI-4.21/t/multipart_globals.t 1970-01-01 01:00:00.000000000 +0100
+++ new/CGI-4.30/t/multipart_globals.t 2016-06-09 13:58:57.000000000 +0200
@@ -0,0 +1,21 @@
+use Test::More 'no_plan';
+
+BEGIN {
+ # assign
+ $MultipartBuffer::INITIAL_FILLUNIT = 'A';
+ $MultipartBuffer::TIMEOUT = 'B';
+ $MultipartBuffer::SPIN_LOOP_MAX = 'C';
+ $MultipartBuffer::CRLF = 'D';
+};
+
+use CGI;
+
+is( $MultipartBuffer::INITIAL_FILLUNIT,'A','INITIAL_FILLUNIT (assigned)' );
+is( $MultipartBuffer::TIMEOUT,'B','TIMEOUT (assigned)' );
+is( $MultipartBuffer::SPIN_LOOP_MAX,'C','SPIN_LOOP_MAX (assigned)' );
+is( $MultipartBuffer::CRLF,'D','CRLF (assigned)' );
+
+is( $CGI::MultipartBuffer::INITIAL_FILLUNIT,'A','INITIAL_FILLUNIT (assigned)' );
+is( $CGI::MultipartBuffer::TIMEOUT,'B','TIMEOUT (assigned)' );
+is( $CGI::MultipartBuffer::SPIN_LOOP_MAX,'C','SPIN_LOOP_MAX (assigned)' );
+is( $CGI::MultipartBuffer::CRLF,'D','CRLF (assigned)' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/param_list_context.t new/CGI-4.30/t/param_list_context.t
--- old/CGI-4.21/t/param_list_context.t 2015-04-16 11:07:47.000000000 +0200
+++ new/CGI-4.30/t/param_list_context.t 2016-05-23 09:58:56.000000000 +0200
@@ -3,12 +3,19 @@
use strict;
use warnings;
-use Test::More tests => 7;
+use Test::More;
use Test::Deep;
use Test::Warn;
use CGI ();
+if ( ! eval 'use Test::Warn; 1' ) {
+ plan skip_all => 'Test::Warn required for this test';
+} else {
+ plan tests => 8;
+}
+
+
# Set up a CGI environment
$ENV{REQUEST_METHOD} = 'GET';
$ENV{QUERY_STRING} = 'game=chess&game=checkers&weather=dull';
@@ -26,10 +33,16 @@
warning_like
{ @params = $q->param('game') }
- qr/CGI::param called in list context from .+param_list_context\.t line 28, this can lead to vulnerabilities/,
+ qr/CGI::param called in list context from .+param_list_context\.t line 35, this can lead to vulnerabilities/,
"calling ->param with args in list context warns"
;
+warnings_are
+ { @params = $q->param('game') }
+ [],
+ " ... but we only warn once",
+;
+
cmp_deeply(
[ sort @params ],
[ qw/ checkers chess / ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CGI-4.21/t/request.t new/CGI-4.30/t/request.t
--- old/CGI-4.21/t/request.t 2015-04-16 11:07:47.000000000 +0200
+++ new/CGI-4.30/t/request.t 2016-05-23 09:58:56.000000000 +0200
@@ -3,9 +3,8 @@
use strict;
use warnings;
-use Test::More tests => 45;
+use Test::More tests => 71;
use Test::Deep;
-use Test::NoWarnings;
use CGI ();
use Config;
@@ -128,3 +127,42 @@
cmp_deeply( [ $q->url_param ],bag( qw/p1 p2 p3 p4/,'' ),'url_param' );
}
}
+
+# regression matrix for request types
+foreach my $test (
+ { desc => "OPTIONS", param => [ undef,undef ], url_param => 'basketball' },
+ { desc => "GET", param => [ undef,'golf' ], url_param => 'basketball' },
+ { desc => "HEAD", param => [ undef,'golf' ], url_param => 'basketball' },
+ { desc => "POST", param => [ 'nice',undef ], url_param => 'basketball' },
+ { desc => "PUT", param => [ 'nice',undef ], url_param => 'basketball' },
+ { desc => "TRACE", param => [ undef,undef ], url_param => 'basketball' },
+ { desc => "CONNECT", param => [ undef,undef ], url_param => 'basketball' },
+ { desc => "DELETE", param => [ undef,'golf' ], url_param => 'basketball' },
+ # first pass over DELETE will enable $CGI::ALLOW_DELETE_CONTENT
+ { desc => "DELETE", param => [ 'nice','golf' ], url_param => 'basketball' },
+) {
+ CGI::_reset_globals;
+
+ my $req_method = $test->{desc};
+ my $test_string = 'game=soccer&game=baseball&weather=nice';
+ local $ENV{REQUEST_METHOD} = $req_method;
+ local $ENV{CONTENT_LENGTH} = length( $test_string );
+ local $ENV{QUERY_STRING} = 'big_balls=basketball&small_balls=golf';
+
+ local *STDIN;
+ open STDIN, '<', \$test_string;
+
+ my $q = CGI->new;
+
+ {
+ is( $q->url_param('big_balls'),$test->{url_param},"CGI::url_param() from $req_method" );
+ is( $q->param('small_balls'),$test->{param}[1],"CGI::param() from $req_method (query string)" );
+
+ local $TODO = $CGI::ALLOW_DELETE_CONTENT ? "content with DELETE" : undef;
+ is( $q->param('weather'),$test->{param}[0],"CGI::param() from $req_method (body)" );
+ }
+
+ if ( $req_method eq 'DELETE' ) {
+ $CGI::ALLOW_DELETE_CONTENT++;
+ }
+}
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module