Skip to content

Update webconsole.main.php#28

Open
nhalstead wants to merge 1 commit intonickola:masterfrom
nhalstead:master
Open

Update webconsole.main.php#28
nhalstead wants to merge 1 commit intonickola:masterfrom
nhalstead:master

Conversation

@nhalstead
Copy link
Copy Markdown

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.

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.
@nhalstead nhalstead closed this Jul 28, 2017
@nhalstead nhalstead reopened this Feb 15, 2019
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant