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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to