Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(macro) fix macro password with arguments #5928

Merged
merged 1 commit into from
Nov 29, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion www/include/monitoring/objectDetails/common-func.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

require_once $centreon_path . "www/class/centreonHost.class.php";

function hidePasswordInCommand($command_name, $host_id, $service_id)
function hidePasswordInCommand($command_name, $host_id, $service_id)
{
global $pearDB;

Expand Down Expand Up @@ -82,6 +82,9 @@ function hidePasswordInCommand($command_name, $host_id, $service_id)
$arrMacroPassword = array_merge ($arrMacroPassword, array($row['host_macro_name']));
}

$commandWithoutArg = explode('!', $command_name);
$command_name = $commandWithoutArg[0];

/* Get command line with macro */
$query_command_line = "SELECT command_line FROM command WHERE command_name = '" .
$pearDB->escape($command_name) . "'";
Expand Down