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.
In reply to Re: uploadInfo - can't use undefined value as a HASH reference
by sgifford
in thread uploadInfo - can't use undefined value as a HASH reference
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |