This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #126141]: qr/]]]]][\\/ fails to raise error
[perl5.git] / t / lib / warnings / taint
1   taint.c AOK
2
3   Insecure %s%s while running with -T switch
4
5 __END__
6 -T
7 --FILE-- abc
8 def
9 --FILE--
10 # taint.c
11 open(FH, "<abc") ;
12 $a = <FH> ;
13 close FH ;
14 chdir $a ;
15 print "xxx\n" ;
16 EXPECT
17 Insecure dependency in chdir while running with -T switch at - line 5.
18 ########
19 -TU
20 --FILE-- abc
21 def
22 --FILE--
23 # taint.c
24 open(FH, "<abc") ;
25 $a = <FH> ;
26 close FH ;
27 chdir $a;
28 no warnings 'taint' ;
29 chdir $a ;
30 print "xxx\n" ;
31 use warnings 'taint' ;
32 chdir $a ;
33 print "yyy\n" ;
34 EXPECT
35 Insecure dependency in chdir while running with -T switch at - line 5.
36 Insecure dependency in chdir while running with -T switch at - line 10.
37 xxx
38 yyy
39 ########
40 -t
41 --FILE-- abc
42 def
43 --FILE--
44 # taint.c
45 open(FH, "<abc") ;
46 $a = <FH> ;
47 close FH ;
48 chdir $a;
49 no warnings 'taint' ;
50 chdir $a ;
51 print "xxx\n" ;
52 use warnings 'taint' ;
53 chdir $a ;
54 print "yyy\n" ;
55 EXPECT
56 Insecure dependency in chdir while running with -t switch at - line 5.
57 Insecure dependency in chdir while running with -t switch at - line 10.
58 xxx
59 yyy