You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Wang1rrr (via GitHub)" <gi...@apache.org> on 2026/10/19 03:31:35 UTC

[I] [Bug] CLI environment isolation drops Path on Windows [rocketmq-dashboard]

Wang1rrr opened a new issue, #6986:
URL: https://github.com/apache/rocketmq-dashboard/issues/6986

   ### Problem
   On Windows, ProcessBuilder.environment() retains case-sensitive Java map keys, commonly `Path`. CliProcessEnvironment looks up only the exact allow-list spelling `PATH`, so the child's executable search path is discarded. Other allowed variables and configured additional names are affected when their spelling differs. Provider overrides can also leave two Windows-equivalent keys, such as HOME and home.
   
   OpenJDK 21's Windows ProcessEnvironment implementation confirms that ProcessBuilder gets a HashMap clone, whereas native Windows variable lookup is case insensitive:
   https://github.com/openjdk/jdk21u/blob/master/src/java.base/windows/classes/java/lang/ProcessEnvironment.java
   
   ### Reproduction
   Pass a case-sensitive parent map containing `Path=C:\node;C:\Windows`, `SYSTEMROOT=C:\Windows`, and an explicitly allowed `custom_config`. The current policy drops all three. Passing parent HOME and provider home leaves both entries instead of overriding.
   
   ### Expected
   Match and override environment names case insensitively on Windows, preserving Unix case sensitivity and the existing inherited allow-list.
   
   Two regression cases fail with the original filtering/merge logic; the Unix isolation regression passes. With the fix, 24 focused Java tests and Checkstyle pass. These tests exercise both platform policies on Linux; native Windows process execution was not run.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] CLI environment isolation drops Path on Windows [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #6986:
URL: https://github.com/apache/rocketmq-dashboard/issues/6986#issuecomment-6433528505

   Closing as not planned: the only production caller passes `builder.environment()`, which is already case-insensitive on Windows, so `Path` / `SystemRoot` are retained regardless of how the parent environment spells them. The proposed change is therefore behaviour-neutral on the production path, and the added tests pass with and without it.
   
   See #6987 for the review. Happy to reopen if you have a Windows reproduction where a variable really is dropped.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] CLI environment isolation drops Path on Windows [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #6986: [Bug] CLI environment isolation drops Path on Windows
URL: https://github.com/apache/rocketmq-dashboard/issues/6986


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org