In answer to the anonymous monk's post, I have looked at both the Taint and Untaint module. The Taint module implements the code from perlsec and puts some pretty wrappers around it. The Untaint module is an interesting mirror image of the code I have written called Detaint. I am doing things, it seems, pretty much according to Hoyle.

I have isolated the issue. Consider the code

#!/usr/bin/perl -T sub is_tainted { return ! eval { join('',@_), kill 0; 1; }; } #--- # This should taint things for me #--- my $taint = shift @ARGV; my $clean = "clean"; my $expected = { clean => $clean, taint => $taint, }; my $wrong = { taint => $taint, clean => $clean, }; printf "\$expected %s tainted\n", is_tainted( $expected ) ? "is" : "is +n't"; printf "\$expected->clean %s tainted\n", is_tainted( $expected->{clean} ) ? "is" : "isn't"; printf "\$expected->taint %s tainted\n", is_tainted( $expected->{taint} ) ? "is" : "isn't"; print "----------\n"; printf "\$wrong %s tainted\n", is_tainted( $wrong ) ? "is" : "isn't"; printf "\$wrong->clean %s tainted\n", is_tainted( $wrong->{clean} ) ? "is" : "isn't"; printf "\$wrong->taint %s tainted\n", is_tainted( $wrong->{taint} ) ? "is" : "isn't";
If the first element in the hash ref is tainted, everything else is as well. If the first element is clean, it isn't. This is very wrong. Do I have enough for a bug report?

Mik Firestone ( perlus bigotus maximus )


In reply to RE: I am so tainted by mikfire
in thread I am so tainted by mikfire

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.