Update webconsole.main.php#28
Open
nhalstead wants to merge 1 commit intonickola:masterfrom
Open
Conversation
Fixes the Issue about the dir command and the relative directory for Command Execution. See: http://imgur.com/a/dP1rs for the Proven Fix in action.
magicsunday
added a commit
to netresearch/web-console
that referenced
this pull request
Apr 21, 2026
Upstream relied on chdir() from set_environment() mutating the PHP process' working directory, which the subsequent proc_open() then inherited. That works for sequential requests but races under concurrency and couples the execution site to a global side effect. Thread the CWD from the RPC environment through execute_command() as an explicit ?string parameter and into proc_open()'s fourth argument. Addresses upstream issues nickola#7 and nickola#33 and the partial fix proposed in upstream PR nickola#28. The run() method extracts environment['path'] directly from the RPC payload using strict type checks -- no empty() construct, no mixed cast -- so the added code stays clean under the phpstan strict rules without widening the baseline.
magicsunday
added a commit
to netresearch/web-console
that referenced
this pull request
Apr 21, 2026
Mirror of the v0.10.0 fix, applied to src/webconsole.main.php. Upstream relied on chdir() from set_environment() mutating the PHP process' working directory, which the subsequent proc_open() then inherited. That works for sequential requests but races under concurrency and couples the execution site to a global side effect. Thread the CWD from the RPC environment through execute_command() as an explicit ?string parameter and into proc_open()'s fourth argument. Addresses upstream issues nickola#7 and nickola#33 and the partial fix proposed in upstream PR nickola#28. The run() method extracts environment['path'] directly from the RPC payload using strict type checks -- no empty() construct, no mixed cast -- so the added code stays clean under the phpstan strict rules without widening the baseline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Issue about the dir command (among others) and the relative directory for Command Execution issue.
This will fix a problem with 0.9.7 and some other Issues on Github.
See Update Changes in action.