Practical mod_perl / HTML Version / books


previous page: 6.5.2.1. Warningspage up: HTML Version of the booknext page: 6.5.3. Compiled Regular Expressions

6.5.2.2. Taint mode


Search







modperlbook.org


 HTML Version


 PDF Version


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.




























Perl's -T switch enables taint mode. In taint mode, Perl performs some checks on how your program is using the data passed to it. For example, taint checks prevent your program from passing some external data to a system call without this data being explicitly checked for nastiness, thus avoiding a fairly large number of common security holes. If you don't force all your scripts and handlers to run under taint mode, it's more likely that you'll leave some holes to be exploited by malicious users. (See Chapter 23 and the perlsec manpage for more information. Also read the re pragma's manpage.)

Since the -Tswitch can't be turned on from within Perl (this is because when Perl is running, it's already too late to mark all external data as tainted), mod_perl provides the PerlTaintCheck directive to turn on taint checks globally. Enable this mode with:

PerlTaintCheck On

anywhere in httpd.conf (though it's better to place it as early as possible for clarity).

For more information on taint checks and how to untaint data, refer to the perlsec manpage.

 

Continue to:

  • prev: 6.5.2.1. Warnings
  • Table of Contents
  • next: 6.5.3. Compiled Regular Expressions

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 6.5.2.1. Warningspage up: HTML Version of the booknext page: 6.5.3. Compiled Regular Expressions

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Wed May 7 06:27:42 2008