OldSchool has asked for the wisdom of the Perl Monks concerning the following question:
GetOptions(
"r=s" => \$opt_remote_dir,
);
$opt_remote_dir =~ /^(.*)$/;
if ( ! $sftp->setcwd( "$opt_remote_dir" ) ) {
$sftp->error returns:
Insecure argument '/test/in' on method call while running with -T switch at /ftp/sbin/sftp.pl line 1674
Even if I untaint the entire command:
$cd_remote_dir="\$sftp->setcwd( \"$opt_remote_dir\" )"; if ( ! eval $cd_remote_dir )I get the same error. If I run the script as a non root user with the -T switch I get the same thing. Evidently there is an issue with running Net::SFTP::Foreign under taint. Hope you can help. I invested a lot of time and effort in Net::SFTP::Foreign. I hate to trash it at the last moment.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: untainting Net::SFTP::Foreign
by salva (Canon) on Mar 22, 2011 at 14:34 UTC |