Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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?


In reply to PerlTaintCheck and configuration for secure paths by geektron

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-23 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found