summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-10-27 19:33:29 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-10-27 19:33:29 +0000
commitc038024b577f2d327a253e9cab04220b888a4e11 (patch)
tree7323913f0cf17026dcce22cc653d4e813c1394ea /t
parentf9c83c4111111c281c2aa7b6ba5e0bb5dd3348cd (diff)
downloadperl-c038024b577f2d327a253e9cab04220b888a4e11.tar.gz
Add a new taint error, "%ENV is aliased to %s".
This error is thrown when taint checks are enabled and when *ENV has been aliased, so that %ENV has no env-magic anymore. (see bug [perl #24291].) p4raw-id: //depot/perl@21563
Diffstat (limited to 't')
-rwxr-xr-xt/op/taint.t11
1 files changed, 5 insertions, 6 deletions
diff --git a/t/op/taint.t b/t/op/taint.t
index 557b15f20c..e7740fe7f0 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -984,13 +984,12 @@ else
}
{
- # test with a non-magical %ENV (and non-magical %ENV elements)
- our %nonmagicalenv = ( PATH => $TAINT );
+ # [perl #24291] this used to dump core
+ our %nonmagicalenv = ( PATH => "util" );
local *ENV = \%nonmagicalenv;
eval { system("lskdfj"); };
- test 207, $@ =~ /Insecure \$ENV{PATH} while running with -T switch/;
- # [perl #24291] this used to dump core
- %nonmagicalenv = ( PATH => "util" );
+ test 207, $@ =~ /^%ENV is aliased to another variable while running with -T switch/;
+ local *ENV = *nonmagicalenv;
eval { system("lskdfj"); };
- test 208, 1;
+ test 208, $@ =~ /^%ENV is aliased to %nonmagicalenv while running with -T switch/;
}