in reply to Taint error on file upload

Sorry Monks! Read all the links & their further links to no avail. Can someone post a few correcting lines of code. Usually I also dislike spoon feeding, but unable to proceed. Thanks. And apologies again.

2018-12-01 Athanasius restored contents

Replies are listed 'Best First'.
Re^2: Taint error on file upload
by Anonymous Monk on Dec 01, 2018 at 02:07 UTC
    %ENV is tainted, meaning $ENV{TEMP} and what not is tainted ...
    $ perl -Te "$f=$ENV{TEMP}.q{/junk}; open my($fh), q{>}, $f; " Insecure dependency in open while running with -T switch at -e line 1.

    In your program write  $ENV{TEMP}='...'; or untaint the other way