![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
The only thing that gets me is the starting point, namely this template file. The fact that you're getting the name of the file directly from the CGI QUERY_STRING, even with all the various s/// operators in there, can still *possibly* leave you open for the "; rm -rf /" attacks. You may have that fixed, but for some reason that concerns me.
Here's my suggestion: Since this appears to be selecting a template file from a limited number of choices, how about creating a hash that maps a template keyword to the actual filename that you use, so that the open call will only see a filename that *you* specify and doesn't at all come from the CGI query. The only major check you'll need is to add a default option if the template keyword parameter is not in your hash, but this is trivial. eg:
In reply to Re: Second hack at Secure Mailer
by Masem
|
|