michellem,

It's probably not coming from $email but from $ENV{PATH}. (When running under taint mode, all command-line arguments, environment variables, and file input are marked as tainted). You can check the taintedness of variables with Devel::Peek and see what the "magic" is set to.

use Devel::Peek; ... my $username = param( username ); Dump( $username ); my $sql = "select ...... LIKE '$username'"; Dump( $sql ); ... Dump( $email ); Dump( $ENV{PATH} );

You should see something like this for $username and $sql and $ENV{PATH}.

SV = PVMG(0x81f8890) at 0x8159bec REFCNT = 1 FLAGS = (GMG,SMG,pPOK) IV = 0 NV = 0 PV = 0x81f3630 "scooby"\0 CUR = 6 LEN = 80 MAGIC = 0x81f3688 MG_VIRTUAL = &PL_vtbl_taint MG_TYPE = 't' MG_LEN = 1

that MG_TYPE of 't' is showing this scalar is tainted. I would be suprised to see that $email is tainted.

-derby


In reply to Re: why is this tainted? by derby
in thread why is this tainted? by michellem

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.