http://www.perlmonks.org?node_id=556956

geektron has asked for the wisdom of the Perl Monks concerning the following question:

I'm working on an application that requires some user-uploaded (image) thumbnail files. Accomplishing that part is simple enough and has already been accomplished.

Now, I'm trying to configure my mod_perl server to allow those directories when PerlTaintCheck is enabled.

I've read through various parts of Practical mod_perl to determine the appopriate settings, but what seemed to be the proper configuration is still warning me of insecure path dependencies ...

I've tried the following in my httpd.conf (within the VirtualHost section):

PerlSetVar RAW_IMAGES /home/httpd/server_root/rawimages PerlSetVar FINAL_IMAGE_DIR /home/httpd/server_root/graphics/uploaded_i +mages PerlSetEnv PATH /home/httpd/server_root/rawimages:/home/httpd/server_r +oot/graphics/uploaded_images PerlTaintCheck On
but i still get: Insecure dependency in open while running with -T switch when I'm trying to write out a thumbnailed image....

Doesn't the PATH setting include filesystem locations that are acceptable for write access?

This is the exact call that fails: open( NEWIMG, "+>$thumbName" ) or croak "Can't open new imagefile: ($thumbName)  $! \n"; I've added a warn() just before the open, and the attempted image name: /home/httpd/server_root/graphics/uploaded_images/679_lg.jpg

that filesystem location is clearly in the PATH setting ... what is it I'm missing?