summaryrefslogtreecommitdiff
path: root/pod/perlsec.pod
diff options
context:
space:
mode:
authorMike Guy <mjtg@cam.ac.uk>2001-06-06 20:58:15 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-06 20:58:15 +0000
commitee556d553a6eff7ecdc9231bcb7bcb56f26130e7 (patch)
treec4bcc6058935e43e5844b0761c74c1da48e801c9 /pod/perlsec.pod
parentbef5f0791f598e360cf5fd6b8d073db19bd2955c (diff)
downloadperl-ee556d553a6eff7ecdc9231bcb7bcb56f26130e7.tar.gz
Re: [ID 20010604.015] taint + comma = false insecurity
Reply-To: mjtg@cam.ac.uk Message-Id: <E157flx-0006Uz-00@draco.cus.cam.ac.uk> p4raw-id: //depot/perl@10459
Diffstat (limited to 'pod/perlsec.pod')
-rw-r--r--pod/perlsec.pod14
1 files changed, 9 insertions, 5 deletions
diff --git a/pod/perlsec.pod b/pod/perlsec.pod
index 622e25fb40..87d1f7b340 100644
--- a/pod/perlsec.pod
+++ b/pod/perlsec.pod
@@ -44,8 +44,8 @@ directories, or processes, B<with the following exceptions>:
=item *
-If you pass a list of arguments to either C<system> or C<exec>,
-the elements of that list are B<not> checked for taintedness.
+If you pass more than one argument to either C<system> or C<exec>,
+the arguments are B<not> checked for taintedness.
=item *
@@ -53,9 +53,10 @@ Arguments to C<print> and C<syswrite> are B<not> checked for taintedness.
=back
-Any variable set to a value
-derived from tainted data will itself be tainted, even if it is
-logically impossible for the tainted data to alter the variable.
+The value of an expression containing tainted data will itself be
+tainted, even if it is logically impossible for the tainted data to
+affect the value.
+
Because taintedness is associated with each scalar value, some
elements of an array can be tainted and others not.
@@ -107,6 +108,9 @@ For example:
# either case the result is tainted since the list of filenames comes
# from outside of the program.
+ $bad = ($arg, 23); # $bad will be tainted
+ $arg, `true`; # Insecure (although it isn't really)
+
If you try to do something insecure, you will get a fatal error saying
something like "Insecure dependency" or "Insecure $ENV{PATH}". Note that you
can still write an insecure B<system> or B<exec>, but only by explicitly