in reply to uploadInfo - can't use undefined value as a HASH reference
Sanitizing your data really is a good idea. You can either pull out the Content-Type before you sanitize the filename, or just reject filenames that you don't like:That led me to look at my sanitize sub. What happened was that $file was "sanitized" for character checking. I had a line in sanitize() as follows:
$checks{'data'} =~ tr/\0//d;When I commented out that line, the uploadInfo function works.
$filename =~ /^(\w[\w.]*)$/ or die "Invalid filename\n"; $filename = $1;
Also, it's strange that your sanitize function would have made a difference at all, unless there were NUL characters in your filenames.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: uploadInfo - can't use undefined value as a HASH reference
by kiat (Vicar) on Apr 20, 2004 at 03:45 UTC |