php-src/TSRM
Christoph M. Becker 9ca449e0a8 Make quoting of cmd execution functions consistent
While the `$command` passed to `proc_open()` had to be wrapped in
double-quotes manually, that was implicitly done for all other
program execution functions.  This could easily introduce bugs and
even security issues when switching from one to another program
execution function.

Furthermore we ensure that the additional quotes are always
unwrapped regardless of what is passed as `$command` by passing
the `/s` flag to cmd.exe.  As it was, `shell_exec('path with
spaces/program.exe')` did execute program.exe, but adding an
argument (`shell_exec('path with spaces/program.exe -h)`) failed
to execute program.exe, because cmd.exe stripped the additional
quotes.

While these changes obviously can cause BC breaks, we feel that in
the long run the benefits of having consistent behavior for all
program execution functions outweighs the drawbacks of potentially
breaking some code now.
2020-02-17 23:17:17 +01:00
..
config.w32 Remove unused tsrm_strtok_r() function 2019-07-12 13:14:24 +02:00
LICENSE - Update to 2006 2006-01-04 23:55:42 +00:00
threads.m4 Remove PTHREADS_ASSIGN_VARS 2019-07-05 23:26:20 +02:00
tsrm_win32.c Make quoting of cmd execution functions consistent 2020-02-17 23:17:17 +01:00
tsrm_win32.h Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
TSRM.c Merge branch 'PHP-7.4' 2019-06-28 10:27:39 +02:00
TSRM.h Make MSVC happy again 2019-09-20 12:51:03 +02:00
tsrm.m4 Merge branch 'PHP-7.4' 2019-07-01 13:26:17 +02:00