View Single Post
  #7 (permalink)  
Old 10-04-03, 11:39 PM
rob2132 rob2132 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: USA
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
$dd = $form{"dets"} || $firstname;
$fd = $form{"file"} || "$dd.html";
open (FH,"../../cvs/$dd/$fd");
read (FH,$response,10000000);
The $fd variable doesn't seem to have any checking, nor does $dd. Be careful about that--you might want to put in safe file types for it to serve up, so people don't use this script to download files off the server you don't want them to (especially config files with passwords, etc.). Also, check for any instance of /\.\.\/ on the file name field, so people can't traverse the directories and download any tile that your script has permission to read.
Reply With Quote