PDA

Click to See Complete Forum and Search --> : problems with writing a file


Razzle
Jun 17th, 2000, 04:26 AM
open (INFILE, "somedata.txt");
@mydata = <INFILE>;
close (INFILE);
print $mydata[0];
open (OUTFILE, ">/forumdata/$mydata[0].txt");

why does this produce the error
Status: 302 Found Location: http://cgi1.tripod.com/bin/error?error=Your%20script%20produced%20this%20error%3A%20Insecure%20dependency%20in%20open%20while%2 0running%20with%20-T%20switch%20at%20.%2Ftest.cgi%20line%2040.%0A URI: http://cgi1.tripod.com/bin/error?error=Your%20script%20produced%20this%20error%3A%20Insecure%20dependency%20in%20open%20while%2 0running%20with%20-T%20switch%20at%20.%2Ftest.cgi%20line%2040.%0A Content-type: text/html

jwilde1
Jun 22nd, 2000, 05:07 AM
Probably has something to do with the Perl taint switch (/usr/bin/perl -t).
Seems to me like it limits which directories can be written to.
Also check directory and file permissions.

Oreilly as updated their Perl web programming book.
It will be released in July. They have a sample
chapter on their web site. The chapter is on security
and it discusses the taint feature.