I want to ask how to filter input on foreman remote execution, example:
ping -c3 22.214.171.124; ls / ; who
How to make template for filter symbol like “;” or “@”,"/","|",etc. Because i just need run one command on one input. Thanks before.
There’s no good way AFAICT. We could probably add some macro, that would wrap the input in
Shellwords.escape. Then in template, you’d do something like
<%= escape_shell(input('aksi')) %>. Would you be interested in opening a PR? Macro should be probably added to https://github.com/theforeman/foreman/blob/develop/lib/foreman/renderer/scope/macros/base.rb#L150
Sorry for the late reply. I have done my problem, i use this regex to my input and i have solve my problem for filter symbol like “;” or “@”,"/","|",etc.
Thanks a lot for your help guys