untaint($detail);
Where did you learn about taint? That is the wrong way to untaint if you're going to use the shell (qx), so you should avoid the shel with system
The easy way
sub GetLGE { use Capture::Tiny qw/ capture /; local %ENV; delete @ENV{'PATH', 'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; $ENV{'PATH'} = '/bin:/usr/bin'; my @args = ( $^X, 'LGE.cgi' ); push @args, ...; untaint($_) for @args; my($stdout, $stderr, $exit) = capture { system { $args[0] } @args; };; if( $exit ){ die "got the exit( $exit ) and stderr: $stderr\n "; } return $stdout; }
The other way is String::ShellQuote
In reply to Re: System Configuration Blocking CGI System Calls? ( shell escapes)
by Anonymous Monk
in thread System Configuration Blocking CGI System Calls?
by Trenin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |