Deprecate str_shell_escape, add safe_shell_quote replacement

This commit is contained in:
Jon Siwek 2019-03-25 17:49:18 -07:00
parent 8b29df96cc
commit dbf5d5fc95
11 changed files with 83 additions and 17 deletions

View file

@ -0,0 +1,2 @@
echo `pwd` ${TEST} > "my file"; echo -e "\n"
"echo \`pwd\` \${TEST} > \"my file\"; echo -e \"\\n\""

View file

@ -0,0 +1,12 @@
#
# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
event bro_init()
{
local a = "echo `pwd` ${TEST} > \"my file\"; echo -e \"\\n\"";
print a;
local b = safe_shell_quote(a);
print b;
}