POD for 3 macros, and internationalized error messages for two macros.

This commit is contained in:
Colin Kuskie 2005-12-17 20:07:08 +00:00
parent eb98d68777
commit f007395c50
5 changed files with 61 additions and 3 deletions

View file

@ -12,11 +12,30 @@ package WebGUI::Macro::Execute;
use strict;
=head1 NAME
Package WebGUI::Macro::Execute
=head1 DESCRIPTION
Allows a content manager or administrator to execute an external program.
=head2 process ( system_call )
=head3 system_call
The system call to execute. STDOUT from the call will be captured and
returned. Calls containing the words passwd, shadow or .conf will
be blocked and an error message returned instead.
=cut
#-------------------------------------------------------------------
sub process {
my @param = @_;
if ($param[0] =~ /passwd/ || $param[0] =~ /shadow/ || $param[0] =~ /\.conf/) {
return "SECURITY VIOLATION";
return WebGUI::International::get('execute error', 'Macro_Execute');
} else {
return `$param[0]`;
}