diff --git a/src/lib-program-client/program-client-remote.c b/src/lib-program-client/program-client-remote.c index 6341da30d6..63687e2b02 100644 --- a/src/lib-program-client/program-client-remote.c +++ b/src/lib-program-client/program-client-remote.c @@ -4,6 +4,7 @@ #include "lib.h" #include "ioloop.h" #include "str.h" +#include "strescape.h" #include "net.h" #include "write-full.h" #include "eacces-error.h" @@ -236,7 +237,7 @@ void program_client_remote_connected(struct program_client *pclient) str_append(str, "-\n"); if (args != NULL) { for(; *args != NULL; args++) { - str_append(str, *args); + str_append_tabescaped(str, *args); str_append_c(str, '\n'); } } diff --git a/src/util/script.c b/src/util/script.c index bae5af2dd8..0ad756fb10 100644 --- a/src/util/script.c +++ b/src/util/script.c @@ -3,6 +3,7 @@ #include "lib.h" #include "array.h" #include "str.h" +#include "strescape.h" #include "env-util.h" #include "execv-const.h" #include "write-full.h" @@ -51,8 +52,10 @@ exec_child(struct master_service_connection *conn, const char *const *args) if (close(conn->fd) < 0) i_error("close(conn->fd) failed: %m"); - for (; *args != NULL; args++) - array_append(&exec_args, args, 1); + for (; *args != NULL; args++) { + const char *arg = t_str_tabunescape(*args); + array_append(&exec_args, &arg, 1); + } array_append_zero(&exec_args); env_clean();