mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
![]() The old code checked for suffixes but didn't take into account trailing whitespace. Furthermore, there is peculiar behaviour with trailing dots too. This all happens because of the special path-handling code inside CreateProcessW. By studying Wine's code, we can see that CreateProcessInternalW calls get_file_name [1] in our case because we haven't provided an application name. That code gets the first whitespace-delimited string into app_name excluding the quotes. It's then passed to create_process_params [2] where there is the path handling code that transforms the command line argument to an image path [3]. Inside Wine, the extension check if performed after these transformations [4]. By doing the same thing in PHP we match the behaviour and can properly match the extension even in the given edge cases. [1] |
||
---|---|---|
.. | ||
array | ||
assert | ||
class_object | ||
crypt | ||
dir | ||
directory | ||
file | ||
filters | ||
general_functions | ||
hrtime | ||
http | ||
image | ||
ini_info | ||
math | ||
misc | ||
network | ||
password | ||
serialize | ||
streams | ||
strings | ||
time | ||
url | ||
versioning | ||
bug49244.phpt | ||
bug64370_var1.phpt | ||
bug64370_var2.phpt | ||
bug71827.phpt | ||
bug75220.phpt | ||
bug79821.phpt | ||
bug80915.phpt | ||
bug81048.phpt | ||
bug81727.phpt | ||
forward_static_call_array.phpt | ||
gh10885.phpt | ||
ghsa-wpj3-hf5j-x4v4.phpt | ||
oss_fuzz_57392.phpt | ||
php_version_win_const.phpt | ||
setrawcookie_basic_001.phpt | ||
setrawcookie_basic_002.phpt | ||
skipif_root.inc |