Possibly superfluous backslash in proc_open() escaping on Windows
Open
Nobody has claimed this yet.
Bug
Extension: standard
OS: Windows
Status: Needs Triage
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
The following code:
<?php
proc_open(["test.bat", "\"¬epad.exe"], …);
passes "test.bat" ^"\^"^¬epad.exe^" to CreateProcess(). The backslash appears to be superfluous.
PHP Version
PHP 8.2
Operating System
Windows
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the PHP 8.2 example on Windows and inspect the proc_open() argument escaping before the CreateProcess() handoff. Compare the generated command with the reported output and determine whether the backslash is superfluous. Done means the behavior is resolved or documented with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100