mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Escape command flags
This commit is contained in:
@@ -12,7 +12,7 @@ if( $in{ 'action' } eq $text{ 'hdparm_apply' } )
|
||||
local $key;
|
||||
foreach $key ( 'a', 'd', 'r', 'k', 'u', 'm', 'c', 'A', 'K', 'P', 'X', 'W', 'S' )
|
||||
{
|
||||
$command .= "-".$key." ".$in{ $key }." " if( $in{ $key } ne "" );
|
||||
$command .= "-".$key." ".quotemeta($in{$key})." " if ($in{$key} ne "");
|
||||
}
|
||||
$command .= $in{ 'drive' }."\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user