Tim Jenness <t.jenness <at> jach.hawaii.edu> writes: >The directory name is picked up by File::Spec->tmpdir. Are you saying >that the directory name is the problem? Yes. >I realize that the temp directory could include spaces which >will break the gzip line unless a multi-arg system is used. Yes, it could even contain backticks causing some other command to be executed. >Should File::Temp->tmpdir have a safe mode? I assume you mean File::Spec->tmpdir. Yes that would be a good idea. However File::Temp is particularly touted as a secure and safe way to generate a temporary file, so it needs to be extra careful. I should note that if taint mode is on then the TMPDIR environment variable is ignored so this becomes unexploitable. That is a good reason to enable taint mode. But I think there should still be a check in File::Temp that the returned filename doesn't have bad characters. -- Ed Avis <eda@waniasset.com>Thread Previous | Thread Next