Like hippo showed, my experience disagrees completely (*). Here's an example of taint vs non-taint with Strawberry 5.32, where I am running 'notepad++.exe', which is in my path.
C:> perl -TE "say $^V; say qq/Taint mode: ${^TAINT}/; system(qq/notepa +d++.exe --help/)" v5.32.1 Taint mode: 1 Insecure $ENV{PATH} while running with -T switch at -e line 1. C:> perl -E "say $^V; say qq/Taint mode: ${^TAINT}/; system(qq/notepad +++.exe --help/)" v5.32.1 Taint mode: 0
The first time, I force taint mode, to show the message when taint is active. The second time, I run it again without forcing taint mode, and it shows that it runs without giving me the insecure-path message. This plainly shows that it's not automatically forcing taint mode just because the version of perl is above 5.26. In the other topic you mentioned, you said you were in a 'use CGI' environment. Depending on how your webserver is set up, your real and effective user and/or group ids may be different, which would trigger automatic taint mode, as corion said much earlier in this conversation. My webserver does not, as I just checked by running:
print "Real Group: $(\n"; print "Effective Group: $)\n"; print "Real User: $<\n"; print "Effective User: $>\n"; print "Taint? ${^TAINT}\n";
inside a script. If I run normally, the last line prints 'Taint? 0' , whereas if I add -T to the shebang in my CGI script, that last line prints 'Taint? 1' , so I know that it can properly identify taint mode. So you should use the '${^TAINT}' to verify that you really are in taint mode. And use the real/effective group and user id variables to confirm what those are set at, to see if one of those is your culprit. Also, you have not shown us a Short, Self-Contained, Correct Example which replicates your tainted results when you don't think you should be in taint, showing that code without taint errors in pre-5.26 will show a taint error in post-5.26, without you intentionally enabling taint mode. Can you share such an SSCCE?
*: Well, almost like hippo. I could not get taint mode to complain when I force taint mode and used 'qx' or backticks, like
C:> perl -TE "use warnings; use strict; say $^V; say qq/Taint mode: ${ +^TAINT}/; qx/notepad++.exe --help/" v5.32.1 Taint mode: 1
... which is why I switched to 'system' instead. So it may be that hippo's qx experiment wasn't sufficient, though I don't expect the non-forced-taint-mode results to change, even if hippo changes over to 'system' instead of 'qx' . edit: clarified/reworded footnote

In reply to Re^12: How to disable taint checking by Perl? by pryrt
in thread How to disable taint checking by Perl? by dissident

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.