From: Alan T. DeKok Date: Sun, 17 Sep 2023 13:26:26 +0000 (-0400) Subject: use correct escaping X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8275837ef6af774fb6398eec19e3b20407bfa099;p=thirdparty%2Ffreeradius-server.git use correct escaping now that we've fixed fr_asprint() in commit b10640, and the escaping in 41193841eb, this test also needs fixing. In order to pass \' to a shell which takes a string in ' quotes, the config file string must use one layer of escaping for FR, and a second layer of escaping for the shell. this issue highlights the fact that we likely need a "q" operator ala Perl. --- diff --git a/src/tests/modules/exec/module.conf b/src/tests/modules/exec/module.conf index 27680b94511..38ea3219246 100644 --- a/src/tests/modules/exec/module.conf +++ b/src/tests/modules/exec/module.conf @@ -10,7 +10,7 @@ exec exec_async_mod { input_pairs = &request shell_escape = yes timeout = 10 - program = "/bin/sh -c 'echo \'Tmp-String-0 = welcome\''" + program = "/bin/sh -c 'echo \\\'Tmp-String-0 = welcome\\\''" } exec exec_sync { @@ -26,7 +26,7 @@ exec exec_sync_mod { output_pairs = &control shell_escape = yes timeout = 10 - program = "/bin/sh -c 'echo \'Tmp-String-0 = welcome\''" + program = "/bin/sh -c 'echo \\\'Tmp-String-0 = welcome\\\''" } exec exec_sync_attrs {