Call me naive, but I never considered Perl's taint mode to be very important for programming secure web applications.

I use it for my CGI scripts, but so far I don't think it ever prevented any malicious actions.

That's probably because my scripts don't work much with the file system, but instead they access a database. (If they do access the file system, it's always with a white listing approach). With DBI's placeholders there's no malicious value an intruder might enter to compromise the database.

For output I use HTML::Template::Compiled with the default_escape => 'HTML' option, so even for "malicious" values (containing HTML meta characters) I don't any HTML injected.

So the "classical" security bugs don't really threaten my CGI scripts - it's more a possible forgotten authentication check or so (or maybe XSRF) that might threaten them - but for those taint mode doesn't really buy me anything at all.

Perl 6 - links to (nearly) everything that is Perl 6.

In reply to Re: Could we get a more systematic approach to security in perl? by moritz
in thread Could we get a more systematic approach to security in perl? by SilasTheMonk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.