|
|
b465e1 |
From e096006aef3f45147f77949c6b07f525aba08fc3 Mon Sep 17 00:00:00 2001
|
|
|
b465e1 |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
b465e1 |
Date: Thu, 11 May 2017 11:27:40 +0200
|
|
|
b465e1 |
Subject: [PATCH] Upgrade to 3.67
|
|
|
b465e1 |
MIME-Version: 1.0
|
|
|
b465e1 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b465e1 |
Content-Transfer-Encoding: 8bit
|
|
|
b465e1 |
|
|
|
b465e1 |
Unbundled from 5.25.12.
|
|
|
b465e1 |
|
|
|
b465e1 |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
b465e1 |
---
|
|
|
b465e1 |
Changes | 12 ++++++++++++
|
|
|
b465e1 |
Cwd.pm | 7 +++++--
|
|
|
b465e1 |
Cwd.xs | 2 +-
|
|
|
b465e1 |
Makefile.PL | 9 +++++++--
|
|
|
b465e1 |
lib/File/Spec.pm | 11 +++++++----
|
|
|
b465e1 |
lib/File/Spec/AmigaOS.pm | 2 +-
|
|
|
b465e1 |
lib/File/Spec/Cygwin.pm | 8 ++++++--
|
|
|
b465e1 |
lib/File/Spec/Epoc.pm | 2 +-
|
|
|
b465e1 |
lib/File/Spec/Functions.pm | 2 +-
|
|
|
b465e1 |
lib/File/Spec/Mac.pm | 6 +++---
|
|
|
b465e1 |
lib/File/Spec/OS2.pm | 2 +-
|
|
|
b465e1 |
lib/File/Spec/Unix.pm | 2 +-
|
|
|
b465e1 |
lib/File/Spec/VMS.pm | 17 ++++++++++-------
|
|
|
b465e1 |
lib/File/Spec/Win32.pm | 8 ++++++--
|
|
|
b465e1 |
14 files changed, 62 insertions(+), 28 deletions(-)
|
|
|
b465e1 |
|
|
|
b465e1 |
diff --git a/Changes b/Changes
|
|
|
b465e1 |
index 09e977a..7d0c179 100644
|
|
|
b465e1 |
--- a/Changes
|
|
|
b465e1 |
+++ b/Changes
|
|
|
b465e1 |
@@ -1,5 +1,17 @@
|
|
|
b465e1 |
Revision history for Perl distribution PathTools.
|
|
|
b465e1 |
|
|
|
b465e1 |
+3.67 - Mon Feb 27 09:33:04 EST 2017
|
|
|
b465e1 |
+- Add security usage note to File::Spec::no_upwards
|
|
|
b465e1 |
+
|
|
|
b465e1 |
+3.66 - Sat Nov 19 10:30:19 MST 2016
|
|
|
b465e1 |
+- white space change so can compile under C++11
|
|
|
b465e1 |
+
|
|
|
b465e1 |
+3.65 - Mon, 25 Jul 2016 23:15:33 -0700
|
|
|
b465e1 |
+- (perl #127384)(CVE-2016-1238)
|
|
|
b465e1 |
+
|
|
|
b465e1 |
+3.64 - Tue May 24 10:00:19 MST 2016
|
|
|
b465e1 |
+- just minor pod changes to silence Pod::Checker
|
|
|
b465e1 |
+
|
|
|
b465e1 |
3.62 - Mon Jan 11 08:39:19 EST 2016
|
|
|
b465e1 |
- ensure File::Spec::canonpath() preserves taint (CVE-2015-8607)
|
|
|
b465e1 |
|
|
|
b465e1 |
diff --git a/Cwd.pm b/Cwd.pm
|
|
|
b465e1 |
index e8b9f19..ce142cf 100644
|
|
|
b465e1 |
--- a/Cwd.pm
|
|
|
b465e1 |
+++ b/Cwd.pm
|
|
|
b465e1 |
@@ -3,7 +3,7 @@ use strict;
|
|
|
b465e1 |
use Exporter;
|
|
|
b465e1 |
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
my $xs_version = $VERSION;
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@@ -40,7 +40,10 @@ if ($^O eq 'os2') {
|
|
|
b465e1 |
my $use_vms_feature;
|
|
|
b465e1 |
BEGIN {
|
|
|
b465e1 |
if ($^O eq 'VMS') {
|
|
|
b465e1 |
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
|
|
|
b465e1 |
+ if (eval { local $SIG{__DIE__};
|
|
|
b465e1 |
+ local @INC = @INC;
|
|
|
b465e1 |
+ pop @INC if $INC[-1] eq '.';
|
|
|
b465e1 |
+ require VMS::Feature; }) {
|
|
|
b465e1 |
$use_vms_feature = 1;
|
|
|
b465e1 |
}
|
|
|
b465e1 |
}
|
|
|
b465e1 |
diff --git a/Cwd.xs b/Cwd.xs
|
|
|
b465e1 |
index 3d018dc..c6c600b 100644
|
|
|
b465e1 |
--- a/Cwd.xs
|
|
|
b465e1 |
+++ b/Cwd.xs
|
|
|
b465e1 |
@@ -424,7 +424,7 @@ int Perl_getcwd_sv(pTHX_ SV *sv)
|
|
|
b465e1 |
#endif
|
|
|
b465e1 |
|
|
|
b465e1 |
#if USE_MY_CXT
|
|
|
b465e1 |
-# define MY_CXT_KEY "Cwd::_guts"XS_VERSION
|
|
|
b465e1 |
+# define MY_CXT_KEY "Cwd::_guts" XS_VERSION
|
|
|
b465e1 |
typedef struct {
|
|
|
b465e1 |
SV *empty_string_sv, *slash_string_sv;
|
|
|
b465e1 |
} my_cxt_t;
|
|
|
b465e1 |
diff --git a/Makefile.PL b/Makefile.PL
|
|
|
b465e1 |
index bc40baf..71b9a60 100644
|
|
|
b465e1 |
--- a/Makefile.PL
|
|
|
b465e1 |
+++ b/Makefile.PL
|
|
|
b465e1 |
@@ -1,5 +1,11 @@
|
|
|
b465e1 |
|
|
|
b465e1 |
-BEGIN { @INC = grep {!/blib/} @INC }
|
|
|
b465e1 |
+# See https://rt.cpan.org/Public/Bug/Display.html?id=4681
|
|
|
b465e1 |
+# and https://rt.perl.org/Ticket/Display.html?id=125603
|
|
|
b465e1 |
+# When installing a newer Cwd on a system with an existing Cwd,
|
|
|
b465e1 |
+# under some circumstances the old Cwd.pm and the new Cwd.xs could
|
|
|
b465e1 |
+# get mixed up and SEGVs ensue.
|
|
|
b465e1 |
+
|
|
|
b465e1 |
+BEGIN { @INC = grep { $_ ne "blib/arch" and $_ ne "blib/lib" } @INC }
|
|
|
b465e1 |
|
|
|
b465e1 |
require 5.005;
|
|
|
b465e1 |
use ExtUtils::MakeMaker;
|
|
|
b465e1 |
@@ -16,7 +22,6 @@ WriteMakefile
|
|
|
b465e1 |
'Carp' => '0',
|
|
|
b465e1 |
'File::Basename' => '0',
|
|
|
b465e1 |
'Scalar::Util' => '0',
|
|
|
b465e1 |
- 'Test' => '0',
|
|
|
b465e1 |
# done_testing() is used in dist/Cwd/t/Spec.t
|
|
|
b465e1 |
'Test::More' => 0.88,
|
|
|
b465e1 |
},
|
|
|
b465e1 |
diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm
|
|
|
b465e1 |
index 32b987e..a9a7619 100644
|
|
|
b465e1 |
--- a/lib/File/Spec.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec.pm
|
|
|
b465e1 |
@@ -3,7 +3,7 @@ package File::Spec;
|
|
|
b465e1 |
use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
my %module = (MacOS => 'Mac',
|
|
|
b465e1 |
@@ -158,10 +158,13 @@ Returns a string representation of the parent directory.
|
|
|
b465e1 |
|
|
|
b465e1 |
=item no_upwards
|
|
|
b465e1 |
|
|
|
b465e1 |
-Given a list of file names, strip out those that refer to a parent
|
|
|
b465e1 |
-directory. (Does not strip symlinks, only '.', '..', and equivalents.)
|
|
|
b465e1 |
+Given a list of files in a directory (such as from C<readdir()>),
|
|
|
b465e1 |
+strip out C<'.'> and C<'..'>.
|
|
|
b465e1 |
|
|
|
b465e1 |
- @paths = File::Spec->no_upwards( @paths );
|
|
|
b465e1 |
+B<SECURITY NOTE:> This does NOT filter paths containing C<'..'>, like
|
|
|
b465e1 |
+C<'../../../../etc/passwd'>, only literal matches to C<'.'> and C<'..'>.
|
|
|
b465e1 |
+
|
|
|
b465e1 |
+ @paths = File::Spec->no_upwards( readdir $dirhandle );
|
|
|
b465e1 |
|
|
|
b465e1 |
=item case_tolerant
|
|
|
b465e1 |
|
|
|
b465e1 |
diff --git a/lib/File/Spec/AmigaOS.pm b/lib/File/Spec/AmigaOS.pm
|
|
|
b465e1 |
index 7a5889c..8d3796e 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/AmigaOS.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/AmigaOS.pm
|
|
|
b465e1 |
@@ -4,7 +4,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.64';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Cygwin.pm b/lib/File/Spec/Cygwin.pm
|
|
|
b465e1 |
index 2092eb8..745df86 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Cygwin.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Cygwin.pm
|
|
|
b465e1 |
@@ -4,7 +4,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
@@ -137,7 +137,11 @@ sub case_tolerant {
|
|
|
b465e1 |
if ($mntopts and ($mntopts =~ /,managed/)) {
|
|
|
b465e1 |
return 0;
|
|
|
b465e1 |
}
|
|
|
b465e1 |
- eval { require Win32API::File; } or return 1;
|
|
|
b465e1 |
+ eval {
|
|
|
b465e1 |
+ local @INC = @INC;
|
|
|
b465e1 |
+ pop @INC if $INC[-1] eq '.';
|
|
|
b465e1 |
+ require Win32API::File;
|
|
|
b465e1 |
+ } or return 1;
|
|
|
b465e1 |
my $osFsType = "\0"x256;
|
|
|
b465e1 |
my $osVolName = "\0"x256;
|
|
|
b465e1 |
my $ouFsFlags = 0;
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Epoc.pm b/lib/File/Spec/Epoc.pm
|
|
|
b465e1 |
index 22f0192..959261a 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Epoc.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Epoc.pm
|
|
|
b465e1 |
@@ -3,7 +3,7 @@ package File::Spec::Epoc;
|
|
|
b465e1 |
use strict;
|
|
|
b465e1 |
use vars qw($VERSION @ISA);
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Functions.pm b/lib/File/Spec/Functions.pm
|
|
|
b465e1 |
index af2c498..cb7532e 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Functions.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Functions.pm
|
|
|
b465e1 |
@@ -5,7 +5,7 @@ use strict;
|
|
|
b465e1 |
|
|
|
b465e1 |
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
require Exporter;
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm
|
|
|
b465e1 |
index 52c3bfe..192cc8d 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Mac.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Mac.pm
|
|
|
b465e1 |
@@ -4,7 +4,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
@@ -121,7 +121,7 @@ doesn't alter the path, i.e. these arguments are ignored. (When a ""
|
|
|
b465e1 |
is passed as the first argument, it has a special meaning, see
|
|
|
b465e1 |
(6)). This way, a colon ":" is handled like a "." (curdir) on Unix,
|
|
|
b465e1 |
while an empty string "" is generally ignored (see
|
|
|
b465e1 |
-C<Unix-E<gt>canonpath()> ). Likewise, a "::" is handled like a ".."
|
|
|
b465e1 |
+L<File::Spec::Unix/canonpath()> ). Likewise, a "::" is handled like a ".."
|
|
|
b465e1 |
(updir), and a ":::" is handled like a "../.." etc. E.g.
|
|
|
b465e1 |
|
|
|
b465e1 |
catdir("a",":",":","b") = ":a:b:"
|
|
|
b465e1 |
@@ -168,7 +168,7 @@ their Unix counterparts:
|
|
|
b465e1 |
# (e.g. "HD:a:")
|
|
|
b465e1 |
|
|
|
b465e1 |
However, this approach is limited to the first arguments following
|
|
|
b465e1 |
-"root" (again, see C<Unix-E<gt>canonpath()> ). If there are more
|
|
|
b465e1 |
+"root" (again, see L<File::Spec::Unix/canonpath()>. If there are more
|
|
|
b465e1 |
arguments that move up the directory tree, an invalid path going
|
|
|
b465e1 |
beyond root can be created.
|
|
|
b465e1 |
|
|
|
b465e1 |
diff --git a/lib/File/Spec/OS2.pm b/lib/File/Spec/OS2.pm
|
|
|
b465e1 |
index 804ecdb..1e201eb 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/OS2.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/OS2.pm
|
|
|
b465e1 |
@@ -4,7 +4,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Unix.pm b/lib/File/Spec/Unix.pm
|
|
|
b465e1 |
index 3916a11..ff3599a 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Unix.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Unix.pm
|
|
|
b465e1 |
@@ -3,7 +3,7 @@ package File::Spec::Unix;
|
|
|
b465e1 |
use strict;
|
|
|
b465e1 |
use vars qw($VERSION);
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
my $xs_version = $VERSION;
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
diff --git a/lib/File/Spec/VMS.pm b/lib/File/Spec/VMS.pm
|
|
|
b465e1 |
index 02cc0b0..fb4351f 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/VMS.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/VMS.pm
|
|
|
b465e1 |
@@ -4,7 +4,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
@@ -39,7 +39,10 @@ via the C<DECC$FILENAME_UNIX_REPORT> CRTL feature.
|
|
|
b465e1 |
|
|
|
b465e1 |
my $use_feature;
|
|
|
b465e1 |
BEGIN {
|
|
|
b465e1 |
- if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
|
|
|
b465e1 |
+ if (eval { local $SIG{__DIE__};
|
|
|
b465e1 |
+ local @INC = @INC;
|
|
|
b465e1 |
+ pop @INC if $INC[-1] eq '.';
|
|
|
b465e1 |
+ require VMS::Feature; }) {
|
|
|
b465e1 |
$use_feature = 1;
|
|
|
b465e1 |
}
|
|
|
b465e1 |
}
|
|
|
b465e1 |
@@ -94,7 +97,7 @@ sub canonpath {
|
|
|
b465e1 |
# [-.-. ==> [--.
|
|
|
b465e1 |
# .-.-] ==> .--]
|
|
|
b465e1 |
# [-.-] ==> [--]
|
|
|
b465e1 |
- 1 while ($path =~ s/(?
|
|
|
b465e1 |
+ 1 while ($path =~ s/(?
|
|
|
b465e1 |
# That loop does the following
|
|
|
b465e1 |
# with any amount (minimum 2)
|
|
|
b465e1 |
# of dashes:
|
|
|
b465e1 |
@@ -105,11 +108,11 @@ sub canonpath {
|
|
|
b465e1 |
#
|
|
|
b465e1 |
# And then, the remaining cases
|
|
|
b465e1 |
$path =~ s/(? [-
|
|
|
b465e1 |
- $path =~ s/(? .
|
|
|
b465e1 |
- $path =~ s/(? [
|
|
|
b465e1 |
- $path =~ s/(? ]
|
|
|
b465e1 |
+ $path =~ s/(? .
|
|
|
b465e1 |
+ $path =~ s/(? [
|
|
|
b465e1 |
+ $path =~ s/(? ]
|
|
|
b465e1 |
# [foo.-] ==> [000000]
|
|
|
b465e1 |
- $path =~ s/(?
|
|
|
b465e1 |
+ $path =~ s/(?
|
|
|
b465e1 |
# [] ==>
|
|
|
b465e1 |
$path =~ s/(?
|
|
|
b465e1 |
return $unix_rpt ? unixify($path) : $path;
|
|
|
b465e1 |
diff --git a/lib/File/Spec/Win32.pm b/lib/File/Spec/Win32.pm
|
|
|
b465e1 |
index 1105b67..17f1c5a 100644
|
|
|
b465e1 |
--- a/lib/File/Spec/Win32.pm
|
|
|
b465e1 |
+++ b/lib/File/Spec/Win32.pm
|
|
|
b465e1 |
@@ -5,7 +5,7 @@ use strict;
|
|
|
b465e1 |
use vars qw(@ISA $VERSION);
|
|
|
b465e1 |
require File::Spec::Unix;
|
|
|
b465e1 |
|
|
|
b465e1 |
-$VERSION = '3.63';
|
|
|
b465e1 |
+$VERSION = '3.67';
|
|
|
b465e1 |
$VERSION =~ tr/_//d;
|
|
|
b465e1 |
|
|
|
b465e1 |
@ISA = qw(File::Spec::Unix);
|
|
|
b465e1 |
@@ -90,7 +90,11 @@ Default: 1
|
|
|
b465e1 |
=cut
|
|
|
b465e1 |
|
|
|
b465e1 |
sub case_tolerant {
|
|
|
b465e1 |
- eval { require Win32API::File; } or return 1;
|
|
|
b465e1 |
+ eval {
|
|
|
b465e1 |
+ local @INC = @INC;
|
|
|
b465e1 |
+ pop @INC if $INC[-1] eq '.';
|
|
|
b465e1 |
+ require Win32API::File;
|
|
|
b465e1 |
+ } or return 1;
|
|
|
b465e1 |
my $drive = shift || "C:";
|
|
|
b465e1 |
my $osFsType = "\0"x256;
|
|
|
b465e1 |
my $osVolName = "\0"x256;
|
|
|
b465e1 |
--
|
|
|
b465e1 |
2.9.3
|
|
|
b465e1 |
|