mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
FS-5449: --resolve add a mod_commands function to use the shell escape function and update the existing function to use correct escaping
adds a pool based implementation of the switch_util_quote_shell_arg function and changes existing function to be a wrapper around the pool based one
This commit is contained in:
@@ -910,10 +910,19 @@ SWITCH_DECLARE(int) switch_strcasecmp_any(const char *str, ...);
|
||||
/*!
|
||||
\brief Quote shell argument
|
||||
\param string the string to quote (example: a ' b"' c)
|
||||
\return the quoted string (gives: 'a '\'' b"'\'' c' for unices, "a ' b ' c" for MS Windows)
|
||||
\return the quoted string (gives: 'a '\'' b"'\'' c' for unices, "a ' b ' c" for MS Windows), should be freed
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_util_quote_shell_arg(const char *string);
|
||||
|
||||
/*!
|
||||
\brief Quote shell argument, allocating from pool if provided
|
||||
\param string the string to quote (example: a ' b"' c)
|
||||
\param pool a memory pool to use
|
||||
\return the quoted string (gives: 'a '\'' b"'\'' c' for unices, "a ' b ' c" for MS Windows), if pool not provided, returned value should be freed
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_util_quote_shell_arg_pool(const char *string, switch_memory_pool_t *pool);
|
||||
|
||||
|
||||
#define SWITCH_READ_ACCEPTABLE(status) (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK)
|
||||
SWITCH_DECLARE(char *) switch_url_encode(const char *url, char *buf, size_t len);
|
||||
SWITCH_DECLARE(char *) switch_url_decode(char *s);
|
||||
|
||||
Reference in New Issue
Block a user