Merge branch '1680-safe-output-wmi-username' into 'develop'

Decode HTML entities in the WMI username.

See merge request artica/pandorafms!1186
This commit is contained in:
vgilc 2017-12-14 15:55:47 +01:00
commit 5620ab4944
1 changed files with 2 additions and 2 deletions

View File

@ -145,10 +145,10 @@ sub data_consumer ($$) {
# Build command to execute
my $wmi_command = '';
if (defined ($module->{'plugin_pass'}) && $module->{'plugin_pass'} ne "") {
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . $module->{'plugin_user'} . '"%"' . pandora_output_password($pa_config, $module->{'plugin_pass'}) . '"';
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . safe_output($module->{'plugin_user'}) . '"%"' . pandora_output_password($pa_config, $module->{'plugin_pass'}) . '"';
}
elsif (defined ($module->{'plugin_user'}) && $module->{'plugin_user'} ne "") {
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . $module->{'plugin_user'} . '"';
$wmi_command = $pa_config->{'wmi_client'} . ' -U "' . safe_output($module->{'plugin_user'}) . '"';
}
else {
$wmi_command = $pa_config->{'wmi_client'} . ' -N';