Update CGI from version 3.63 to 3.64
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 27 Nov 2013 08:34:21 +0000 (08:34 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 27 Nov 2013 08:34:21 +0000 (08:34 +0000)
    [BUG FIXES]
    - Avoid warning about "undefined variable in user_agent in some cases (RT#72882)

    [INTERNALS]
    - Avoiding warning about "unitialized value" in when calling user_agent() in some cases. (RT#72882, perl@max-maurer.de)
    - Update minimum required version in Makefile.PL to 5.8.1. It had already been
      updated to 5.8.1 in the CGI.pm module in 3.53.
    - Fix POD errors reported by newer pod2man (Thanks to jmdh)
    - Typo fixes, (dsteinbrunner).
    - use deprecate.pm on perls 5.19.0 and later. (rjbs).

    [DOCUMENTATION]
    - Update CGI::Cookie docs to reflect that HttpOnly is widely supported now.

12 files changed:
Porting/Maintainers.pl
cpan/CGI/lib/CGI.pm
cpan/CGI/lib/CGI/Apache.pm
cpan/CGI/lib/CGI/Carp.pm
cpan/CGI/lib/CGI/Cookie.pm
cpan/CGI/lib/CGI/Fast.pm
cpan/CGI/lib/CGI/Pretty.pm
cpan/CGI/lib/CGI/Push.pm
cpan/CGI/lib/CGI/Switch.pm
cpan/CGI/lib/CGI/Util.pm
cpan/CGI/t/url.t
pod/perldelta.pod

index cf22bc7..60e7d9a 100755 (executable)
@@ -198,7 +198,7 @@ use File::Glob qw(:case);
     },
 
     'CGI' => {
-        'DISTRIBUTION' => 'MARKSTOS/CGI.pm-3.63.tar.gz',
+        'DISTRIBUTION' => 'MARKSTOS/CGI.pm-3.64.tar.gz',
         'FILES'        => q[cpan/CGI],
         'EXCLUDED'     => [
             qr{^examples/},
index df63490..4867dfe 100644 (file)
@@ -1,5 +1,6 @@
 package CGI;
 require 5.008001;
+use if $] >= 5.019, 'deprecate';
 use Carp 'croak';
 
 # See the bottom of this file for the POD documentation.  Search for the
@@ -18,9 +19,9 @@ use Carp 'croak';
 # The most recent version and complete docs are available at:
 #   http://search.cpan.org/dist/CGI.pm
 
-# The revision is no longer being updated since moving to git. 
+# The revision is no longer being updated since moving to git.
 $CGI::revision = '$Id: CGI.pm,v 1.266 2009/07/30 16:32:34 lstein Exp $';
-$CGI::VERSION='3.63';
+$CGI::VERSION='3.64';
 
 # HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
 # UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -171,7 +172,7 @@ $DefaultClass = 'CGI' unless defined $CGI::DefaultClass;
 $AutoloadClass = $DefaultClass unless defined $CGI::AutoloadClass;
 
 # The path separator is a slash, backslash or semicolon, depending
-# on the paltform.
+# on the platform.
 $SL = {
      UNIX    => '/',  OS2 => '\\', EPOC      => '/', CYGWIN => '/', NETWARE => '/',
      WINDOWS => '\\', DOS => '\\', MACINTOSH => ':', VMS    => '/'
@@ -3131,7 +3132,7 @@ END_OF_FUNC
 sub user_agent {
     my($self,$match)=self_or_CGI(@_);
     my $user_agent = $self->http('user_agent');
-    return $user_agent unless $match && $user_agent;
+    return $user_agent unless defined $match && $match && $user_agent;
     return $user_agent =~ /$match/i;
 }
 END_OF_FUNC
@@ -4320,7 +4321,7 @@ submissions, file uploads, reading and writing cookies, query string generation
 and manipulation, and processing and preparing HTTP headers. Some HTML
 generation utilities are included as well.
 
-CGI.pm performs very well in in a vanilla CGI.pm environment and also comes
+CGI.pm performs very well in a vanilla CGI.pm environment and also comes
 with built-in support for mod_perl and mod_perl2 as well as FastCGI.
 
 It has the benefit of having developed and refined over 10 years with input
@@ -5506,9 +5507,9 @@ backwards compatibility.
 
 The old-style positional parameters are as follows:
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -5524,13 +5525,12 @@ A 'true' flag if you want to include a <base> tag in the header.  This
 helps resolve relative addresses to absolute ones when the document is moved, 
 but makes the document hierarchy non-portable.  Use with care!
 
-=item 4, 5, 6...
-
-Any other parameters you want to include in the <body> tag.  This is a good
-place to put HTML extensions, such as colors and wallpaper patterns.
-
 =back
 
+Other parameters you want to include in the <body> tag may be appended
+to these.  This is a good place to put HTML extensions, such as colors and
+wallpaper patterns.
+
 =head2 ENDING THE HTML DOCUMENT:
 
        print $q->end_html;
@@ -6076,9 +6076,9 @@ supported.
 
 textfield() will return a text input field. 
 
-=over 4
+B<Parameters>
 
-=item B<Parameters>
+=over 4
 
 =item 1.
 
@@ -6159,9 +6159,9 @@ by calling B<start_form()> with an encoding type of B<&CGI::MULTIPART>,
 or by calling the new method B<start_multipart_form()> instead of
 vanilla B<start_form()>.
 
-=over 4
+B<Parameters>
 
-=item B<Parameters>
+=over 4
 
 =item 1.
 
@@ -6514,9 +6514,9 @@ attribute's value as the value.
 
 scrolling_list() creates a scrolling list.  
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6590,9 +6590,9 @@ selected items can be retrieved with:
 checkbox_group() creates a list of checkboxes that are related
 by the same name.
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6617,7 +6617,6 @@ list.  Otherwise, they will be strung together on a horizontal line.
 
 =back
 
-
 The optional B<-labels> argument is a pointer to a hash
 relating the checkbox values to the user-visible labels that will be
 printed next to them.  If not provided, the values will be used as the
@@ -6683,9 +6682,9 @@ or in other creative ways:
 checkbox() is used to create an isolated checkbox that isn't logically
 related to any others.
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6740,9 +6739,9 @@ The value of the checkbox can be retrieved using:
 radio_group() creates a set of logically-related radio buttons
 (turning one member of the group on turns the others off)
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6777,7 +6776,6 @@ displayed.
 
 =back
 
-
 All modern browsers can take advantage of the optional parameters
 B<-rows>, and B<-columns>.  These parameters cause radio_group() to
 return an HTML3 compatible table containing the radio group formatted
@@ -6840,9 +6838,9 @@ or in other creative ways:
 submit() will create the query submission button.  Every form
 should have one of these.
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6901,9 +6899,9 @@ hidden() produces a text field that can't be seen by the user.  It
 is useful for passing state variable information from one invocation
 of the script to the next.
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6944,9 +6942,9 @@ position of the click is returned to your script as "button_name.x"
 and "button_name.y", where "button_name" is the name you've assigned
 to it.
 
-=over 4
+B<Parameters:>
 
-=item B<Parameters:>
+=over 4
 
 =item 1.
 
@@ -6958,6 +6956,7 @@ field.
 The second argument (-src) is also required and specifies the URL
 
 =item 3.
+
 The third option (-align, optional) is an alignment type, and may be
 TOP, BOTTOM or MIDDLE
 
index e055e30..bde3ad9 100644 (file)
@@ -1,7 +1,8 @@
 package CGI::Apache;
 use CGI;
+use if $] >= 5.019, 'deprecate';
 
-$VERSION = '1.01';
+$VERSION = '1.02';
 
 1;
 __END__
index c2145ca..806f05d 100644 (file)
@@ -1,4 +1,5 @@
 package CGI::Carp;
+use if $] >= 5.019, 'deprecate';
 
 =head1 NAME
 
@@ -191,13 +192,13 @@ when a C<die()> is done inside an C<eval> body or expression.
 Even though the
 fatalsToBrower support takes precautions to avoid this,
 you still may get the error message printed to STDOUT.
-This may have some undesireable effects when the purpose of doing the
+This may have some undesirable effects when the purpose of doing the
 eval is to determine which of several algorithms is to be used.
 
 By setting C<$CGI::Carp::TO_BROWSER> to 0 you can suppress printing
 the C<die> messages but without all of the complexity of using
 C<set_die_handler>.  You can localize this effect to inside C<eval>
-bodies if this is desireable: For example:
+bodies if this is desirable: For example:
 
  eval {
    local $CGI::Carp::TO_BROWSER = 0;
@@ -344,7 +345,7 @@ use File::Spec;
 
 $main::SIG{__WARN__}=\&CGI::Carp::warn;
 
-$CGI::Carp::VERSION     = '3.51';
+$CGI::Carp::VERSION     = '3.64';
 $CGI::Carp::CUSTOM_MSG  = undef;
 $CGI::Carp::DIE_HANDLER = undef;
 $CGI::Carp::TO_BROWSER  = 1;
index da916ac..5cc2dc2 100644 (file)
@@ -3,6 +3,8 @@ package CGI::Cookie;
 use strict;
 use warnings;
 
+use if $] >= 5.019, 'deprecate';
+
 # See the bottom of this file for the POD documentation.  Search for the
 # string '=head'.
 
@@ -16,7 +18,7 @@ use warnings;
 # wish, but if you redistribute a modified version, please attach a note
 # listing the modifications you have made.
 
-our $VERSION='1.30';
+our $VERSION='1.31';
 
 use CGI::Util qw(rearrange unescape escape);
 use overload '""' => \&as_string, 'cmp' => \&compare, 'fallback' => 1;
@@ -334,13 +336,12 @@ If the "httponly" attribute is set, the cookie will only be accessible
 through HTTP Requests. This cookie will be inaccessible via JavaScript
 (to prevent XSS attacks).
 
-This feature is only supported by recent browsers like Internet Explorer
-6 Service Pack 1, Firefox 3.0 and Opera 9.5 (and later of course).
+This feature is supported by nearly all modern browsers.
 
 See these URLs for more information:
 
        http://msdn.microsoft.com/en-us/library/ms533046.aspx
-       http://www.owasp.org/index.php/HTTPOnly#Browsers_Supporting_HTTPOnly
+    http://www.browserscope.org/?category=security&v=top
 
 =back
 
index 288d854..01f7359 100644 (file)
@@ -1,5 +1,6 @@
 package CGI::Fast;
 use strict;
+use if $] >= 5.019, 'deprecate';
 
 # A way to say "use warnings" that's compatible with even older perls.
 # making it local will not affect the code that loads this module
@@ -19,7 +20,7 @@ local $^W = 1;
 # wish, but if you redistribute a modified version, please attach a note
 # listing the modifications you have made.
 
-$CGI::Fast::VERSION='1.09';
+$CGI::Fast::VERSION='1.10';
 
 use CGI;
 use FCGI;
index 869fe0c..acded21 100644 (file)
@@ -8,9 +8,10 @@ package CGI::Pretty;
 # Perl 5 distribution).
 
 use strict;
+use if $] >= 5.019, 'deprecate';
 use CGI ();
 
-$CGI::Pretty::VERSION = '3.46';
+$CGI::Pretty::VERSION = '3.64';
 $CGI::DefaultClass = __PACKAGE__;
 $CGI::Pretty::AutoloadClass = 'CGI';
 @CGI::Pretty::ISA = qw( CGI );
@@ -168,7 +169,7 @@ sub initialize_globals {
     # This is the string used for indentation of tags
     $CGI::Pretty::INDENT = "\t";
     
-    # This is the string used for seperation between tags
+    # This is the string used for separation between tags
     $CGI::Pretty::LINEBREAK = $/;
 
     # These tags are not prettify'd.
index 2af7d79..3353efc 100644 (file)
@@ -1,4 +1,5 @@
 package CGI::Push;
+use if $] >= 5.019, 'deprecate';
 
 # See the bottom of this file for the POD documentation.  Search for the
 # string '=head'.
@@ -16,7 +17,7 @@ package CGI::Push;
 # The most recent version and complete docs are available at:
 #   http://stein.cshl.org/WWW/software/CGI/
 
-$CGI::Push::VERSION='1.05';
+$CGI::Push::VERSION='1.06';
 use CGI;
 use CGI::Util 'rearrange';
 @ISA = ('CGI');
index a311080..ec21fe2 100644 (file)
@@ -1,7 +1,8 @@
 package CGI::Switch;
+use if $] >= 5.019, 'deprecate';
 use CGI;
 
-$VERSION = '1.01';
+$VERSION = '1.02';
 
 1;
 
index 494560e..4a1f28f 100644 (file)
@@ -2,10 +2,11 @@ package CGI::Util;
 use base 'Exporter';
 require 5.008001;
 use strict;
+use if $] >= 5.019, 'deprecate';
 our @EXPORT_OK = qw(rearrange rearrange_header make_attributes unescape escape
         expires ebcdic2ascii ascii2ebcdic);
 
-our $VERSION = '3.62';
+our $VERSION = '3.64';
 
 use constant EBCDIC => "\t" ne "\011";
 
@@ -210,7 +211,7 @@ sub unescape {
 # Byte strings were traditionally used directly as a sequence of octets.
 # This worked if they actually represented binary data (i.e. in CGI::Compress).
 # This also worked if these byte strings were actually utf-8 encoded; e.g.,
-# when the source file used utf-8 without the apropriate "use utf8;".
+# when the source file used utf-8 without the appropriate "use utf8;".
 # This fails if the byte string is actually a Latin 1 encoded string, but it
 # was always so and cannot be fixed without breaking the binary data case.
 # -- Stepan Kasal <skasal@redhat.com>
index 4572ef4..1a8198a 100644 (file)
@@ -66,7 +66,18 @@ subtest 'rewrite_interactions' => sub {
                                                 '$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();
+};
+
+subtest 'RT#58377: + in PATH_INFO' => sub {
+    local $ENV{PATH_INFO}             = '/hello+world';
+    local $ENV{HTTP_X_FORWARDED_HOST} = undef;
+    local $ENV{'HTTP_HOST'}           = 'example.com';
+    local $ENV{'SCRIPT_NAME'}         = '/script/plus+name.cgi';
+    local $ENV{'SCRIPT_FILENAME'}     = '/script/plus+filename.cgi';
+
+    my $q = CGI->new;
+    is($q->url(), 'http://example.com/script/plus+name.cgi', 'a plus sign in a script name is preserved when calling url()');
+    is($q->path_info(), '/hello+world', 'a plus sign in a script name is preserved when calling path_info()');
 };
 
 
index a603266..ff07432 100644 (file)
@@ -119,7 +119,11 @@ XXX
 
 =item *
 
-L<XXX> has been upgraded from version A.xx to B.yy.
+L<CGI> has been upgraded from version 3.63 to 3.64.
+
+Avoids a warning about "undefined variable in user_agent" in some cases, and
+updates L<CGI::Cookie> documentation to reflect that "HttpOnly" is widely
+supported.
 
 =back