mirror of https://github.com/Icinga/icinga2.git
Fix shell escaping in the macro processor.
This commit is contained in:
parent
1a3ecb04fb
commit
8df0525e3e
|
@ -94,12 +94,12 @@ String MacroProcessor::InternalResolveMacros(const String& str, const std::vecto
|
||||||
if (!found)
|
if (!found)
|
||||||
Log(LogWarning, "icinga", "Macro '" + name + "' is not defined.");
|
Log(LogWarning, "icinga", "Macro '" + name + "' is not defined.");
|
||||||
|
|
||||||
|
if (escapeFn)
|
||||||
|
resolved_macro = escapeFn(resolvedMacro);
|
||||||
|
|
||||||
result.Replace(pos_first, pos_second - pos_first + 1, resolved_macro);
|
result.Replace(pos_first, pos_second - pos_first + 1, resolved_macro);
|
||||||
offset = pos_first + resolved_macro.GetLength();
|
offset = pos_first + resolved_macro.GetLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (escapeFn)
|
|
||||||
result = escapeFn(result);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue