Commit | Line | Data |
---|---|---|
0453d815 | 1 | taint.c AOK |
599cee73 | 2 | |
599cee73 | 3 | Insecure %s%s while running with -T switch |
4 | ||
599cee73 | 5 | __END__ |
0453d815 | 6 | -T |
7 | --FILE-- abc | |
8 | def | |
9 | --FILE-- | |
599cee73 | 10 | # taint.c |
0453d815 | 11 | open(FH, "<abc") ; |
12 | $a = <FH> ; | |
13 | close FH ; | |
14 | chdir $a ; | |
15 | print "xxx\n" ; | |
599cee73 | 16 | EXPECT |
0453d815 | 17 | Insecure dependency in chdir while running with -T switch at - line 5. |
599cee73 | 18 | ######## |
0453d815 | 19 | -TU |
20 | --FILE-- abc | |
21 | def | |
22 | --FILE-- | |
599cee73 | 23 | # taint.c |
0453d815 | 24 | open(FH, "<abc") ; |
25 | $a = <FH> ; | |
26 | close FH ; | |
b7bf404b | 27 | chdir $a; |
28 | no warnings 'taint' ; | |
0453d815 | 29 | chdir $a ; |
30 | print "xxx\n" ; | |
b7bf404b | 31 | use warnings 'taint' ; |
32 | chdir $a ; | |
33 | print "yyy\n" ; | |
599cee73 | 34 | EXPECT |
b7bf404b | 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. | |
0453d815 | 37 | xxx |
b7bf404b | 38 | yyy |
0453d815 | 39 | ######## |
b7bf404b | 40 | -t |
0453d815 | 41 | --FILE-- abc |
42 | def | |
43 | --FILE-- | |
44 | # taint.c | |
45 | open(FH, "<abc") ; | |
46 | $a = <FH> ; | |
47 | close FH ; | |
b7bf404b | 48 | chdir $a; |
49 | no warnings 'taint' ; | |
0453d815 | 50 | chdir $a ; |
51 | print "xxx\n" ; | |
b7bf404b | 52 | use warnings 'taint' ; |
0453d815 | 53 | chdir $a ; |
54 | print "yyy\n" ; | |
55 | EXPECT | |
b7bf404b | 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. | |
0453d815 | 58 | xxx |
59 | yyy |