summaryrefslogtreecommitdiff
path: root/cpan/Encode/t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-24 19:14:08 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-05-24 19:14:08 +0100
commitbbf2f5be121c69b9c2c5ad2cb7f313f3a3833fce (patch)
tree8de795cd802cc080d7b2b528f1fb47dd4058ead2 /cpan/Encode/t
parent54b985aaf6458a3ba4f6ff294da358647a0b39d8 (diff)
downloadperl-bbf2f5be121c69b9c2c5ad2cb7f313f3a3833fce.tar.gz
Update Encode to CPAN version 2.51
[DELTA] $Revision: 2.51 $ $Date: 2013/04/29 22:19:11 $ ! Encode.xs Addressed: Encode.xs doesn't compile with Microsoft C compiler https://rt.cpan.org/Public/Bug/Display.html?id=84920 ! MANIFEST Addressed: t/taint.t missing https://rt.cpan.org/Public/Bug/Display.html?id=84919 2.50 2013/04/26 18:30:46 ! Encode.xs Unicode/Unicode.xs lib/Encode/Unicode/UTF7.pm lib/CN/HZ.pm lib/Encode/GSM0338.pm t/taint.t Addressed: Encode::encode and Encode::decode gratuitously launders tainted data Taintedness now propagates as it should. https://rt.cpan.org/Ticket/Display.html?id=84879 ! encoding.pm Addressed: 5.18 deprecation https://rt.cpan.org/Ticket/Display.html?id=84709 ! bin/piconv Applied: Update piconv documentation https://rt.cpan.org/Ticket/Display.html?id=84695
Diffstat (limited to 'cpan/Encode/t')
-rw-r--r--cpan/Encode/t/taint.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpan/Encode/t/taint.t b/cpan/Encode/t/taint.t
new file mode 100644
index 0000000000..ade8b07c93
--- /dev/null
+++ b/cpan/Encode/t/taint.t
@@ -0,0 +1,15 @@
+#!/usr/bin/perl -T
+use strict;
+use Encode qw(encode decode);
+use Scalar::Util qw(tainted);
+use Test::More;
+
+my $str = "abc" . substr($ENV{PATH},0,0); # tainted string
+my @names = Encode->encodings(':all');
+plan tests => 2 * @names;
+for my $name (@names){
+ my $e = encode($name, $str);
+ ok tainted($e), "encode $name";
+ my $d = decode($name, $e);
+ ok tainted($d), "decode $name";
+}