mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix quoting of args
This commit is contained in:
@@ -14,6 +14,7 @@ my ($mgr) = glob($config{'cachemgr_path'});
|
|||||||
if (&has_command($mgr)) {
|
if (&has_command($mgr)) {
|
||||||
$| = 1;
|
$| = 1;
|
||||||
my $temp;
|
my $temp;
|
||||||
|
my $args = join(" ", map { quotemeta($_) } @ARGV);
|
||||||
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
|
if ($ENV{'REQUEST_METHOD'} eq 'POST') {
|
||||||
# Deal with POST data
|
# Deal with POST data
|
||||||
my $post;
|
my $post;
|
||||||
@@ -23,10 +24,10 @@ if (&has_command($mgr)) {
|
|||||||
&open_tempfile($fh, ">$temp", 0, 1);
|
&open_tempfile($fh, ">$temp", 0, 1);
|
||||||
&print_tempfile($fh, $post);
|
&print_tempfile($fh, $post);
|
||||||
&close_tempfile($fh);
|
&close_tempfile($fh);
|
||||||
open(MGR, "$mgr ".join(" ", @ARGV)." <$temp |");
|
open(MGR, "$mgr $args <$temp |");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
open(MGR, "$mgr ".join(" ", @ARGV)." |");
|
open(MGR, "$mgr $args |");
|
||||||
}
|
}
|
||||||
while(<MGR>) {
|
while(<MGR>) {
|
||||||
print;
|
print;
|
||||||
|
|||||||
Reference in New Issue
Block a user