diff options
author | Randy J. Ray <rjray@uswest.com> | 1996-10-08 22:24:48 -0400 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-10-08 22:24:48 -0400 |
commit | 515e7bd7b61ce9581ca597e2697aa243300f4a60 (patch) | |
tree | d1fef14dc402cae43bcaeeb251427ea189aca1b3 /ext/IO/lib | |
parent | 59629a133a44e0c0672b4b2244f7db38a6ace577 (diff) | |
download | perl-515e7bd7b61ce9581ca597e2697aa243300f4a60.tar.gz |
PATCH: untaint method for IO::Handle, 5.003_06 version
This is a re-post of my patch to Graham's IO library to add a method in
IO::Handle called "untaint", that sets the IOf_UNTAINT flag on an object
that is of or inherits from IO::Handle. With this flag set, data read from
said handle is not tainted, whether running under -T, suid or sgid.
This patch adds the method to IO.xs, adds documentation and warning to the
pod of IO/Handle.pm, creates a new test in t/lib called io_taint.t, and
adds mention of the new file to MANIFEST.
Document IO::Handle::untaint and give warning about the bad
things it can do.
Diffstat (limited to 'ext/IO/lib')
-rw-r--r-- | ext/IO/lib/IO/Handle.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/IO/lib/IO/Handle.pm b/ext/IO/lib/IO/Handle.pm index 54b32f4a64..e4abdd2ecb 100644 --- a/ext/IO/lib/IO/Handle.pm +++ b/ext/IO/lib/IO/Handle.pm @@ -143,6 +143,19 @@ Returns true if the object is currently a valid file descriptor. =back +Lastly, a special method for working under B<-T> and setuid/gid scripts: + +=over + +=item $fh->untaint + +Marks the object as taint-clean, and as such data read from it will also +be considered taint-clean. Note that this is a very trusting action to +take, and appropriate consideration for the data source and potential +vulnerability should be kept in mind. + +=back + =head1 NOTE A C<IO::Handle> object is a GLOB reference. Some modules that |