When -T taint mode is active Perl stops your code from doing potentially bad things. What this means is that you may not use external input to your script to effect anything outside your script. Without seeing your code all I can suggest is that your @cols array takes a feed from outside the script and is then being used to do something that taint regards as risky. To fix the problem you need to cleanse the values in @cols by running them through a regex like:

sub untaint { my $val = shift; $val =~ s/[^\w.-]/_/g; # tr/A-Za-z0-9.-/_/c is faster but less e +asy to read for some $val =~ m/([^\w.-])/; my $clean_taint_free_val = $1; return $clean_taint_free_val; }

In this case we set up a substitution to convert all non alphanumerics . or - to _ and then do a capturing match. The captured value in $1 is untainted as you have processed it and perl assumes you know what you are doing. You modify this as required. It is always better to specifically include what you need adn ditch re rest rather than trying to substitute out potentially risky shell metachars as you will always miss some.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: setuid script returning Insecure dependency by tachyon
in thread setuid script returning Insecure dependency by rdww

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.