diff options
author | Scott MacVicar <scottmac@php.net> | 2008-05-30 16:56:57 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2008-05-30 16:56:57 +0000 |
commit | 4ae8e34bf4c2e98dc684a2425b0d9b0c53e715cd (patch) | |
tree | 0d095e56638cb0202217578143db6563f4fc18fc /ext | |
parent | c1126cc5b67320f51880782da43e0cf914bc575f (diff) | |
download | php-git-4ae8e34bf4c2e98dc684a2425b0d9b0c53e715cd.tar.gz |
MFH Fixed bug #43261
(Use ^ as an escape character for Windows escapeshellcmd)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/standard/exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c index db4f3f6a39..0f00df2665 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -322,12 +322,12 @@ PHPAPI char *php_escape_shell_cmd(char *str) case '\x0A': /* excluding these two */ case '\xFF': #ifdef PHP_WIN32 - /* since Windows does not allow us to escape these chars, just remove them */ + /* This is Windows specific for enviromental variables */ case '%': - cmd[y++] = ' '; - break; -#endif + cmd[y++] = '^'; +#else cmd[y++] = '\\'; +#endif /* fall-through */ default: cmd[y++] = str[x]; |