This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
YA resync with mainstem, including VMS patches from others
[perl5.git] / t / pragma / warn / taint
CommitLineData
0453d815 1 taint.c AOK
599cee73 2
599cee73
PM
3 Insecure %s%s while running with -T switch
4
599cee73 5__END__
0453d815
PM
6-T
7--FILE-- abc
8def
9--FILE--
599cee73 10# taint.c
0453d815
PM
11open(FH, "<abc") ;
12$a = <FH> ;
13close FH ;
14chdir $a ;
15print "xxx\n" ;
599cee73 16EXPECT
0453d815 17Insecure dependency in chdir while running with -T switch at - line 5.
599cee73 18########
0453d815
PM
19-TU
20--FILE-- abc
21def
22--FILE--
599cee73 23# taint.c
0453d815
PM
24open(FH, "<abc") ;
25$a = <FH> ;
26close FH ;
27chdir $a ;
28print "xxx\n" ;
599cee73 29EXPECT
0453d815
PM
30xxx
31########
32-TU
33--FILE-- abc
34def
35--FILE--
36# taint.c
37open(FH, "<abc") ;
38$a = <FH> ;
39close FH ;
4438c4b7 40use warnings 'taint' ;
0453d815
PM
41chdir $a ;
42print "xxx\n" ;
4438c4b7 43no warnings 'taint' ;
0453d815
PM
44chdir $a ;
45print "yyy\n" ;
46EXPECT
47Insecure dependency in chdir while running with -T switch at - line 6.
48xxx
49yyy