in reply to Re: unlink taint
in thread unlink taint

You are mistaken.

$ perl -MScalar::Util=tainted -TE'say tainted($_) for glob "*"' 1 1 1 1

glob is a source of external input when "*" is used. Same goes for readdir.

$ perl -MScalar::Util=tainted -TE'opendir(my $dh, "."); say tainted($_ +) for readdir($dh)' 1 1 1 1 1 1

Replies are listed 'Best First'.
Re^3: unlink taint
by Anonyrnous Monk (Hermit) on Dec 20, 2010 at 22:57 UTC
    glob is a source of external input when "*" is used.

    You're right. A quick test shows, though, that it doesn't matter whether there's a '*' in the glob expression or not:

    $ perl -MScalar::Util=tainted -TE'say tainted($_) for glob "foo"' 1
      Interesting, thanks.