You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After install mongodb-compass-1.23.0-win32-x64.msi if you rename any exe to wmic.exe and put it to C:\node_modules\.bin\wmic.exe then launch mongodb compass you can find C:\node_modules\.bin\wmic.exe will be executed by mongodb compass.
As far as I know, this is because mongodb compass used NPM library execa(https://github.com/sindresorhus/execa) for process execution. When you set "preferLocal" to true in this library "C:\node_modules\.bin" will be added to environment path. So if there is a "C:\node_modules\.bin\wmic.exe" then it will be execute by mongodb compass.
Expected Behavior/Code
C:\node_modules\.bin\wmic.exe should not be executed by mongodb compass.
Environment
OS: windows 10
Possible Solution
Set "preferLocal" to false should solve this.
Additional Context/Screenshots
I attached a stack trace in Process Monitor.
The text was updated successfully, but these errors were encountered:
Bug Report - execute exe from unexpected path
Current Behavior
After install mongodb-compass-1.23.0-win32-x64.msi if you rename any exe to wmic.exe and put it to C:\node_modules\.bin\wmic.exe then launch mongodb compass you can find C:\node_modules\.bin\wmic.exe will be executed by mongodb compass.
As far as I know, this is because mongodb compass used NPM library execa(https://github.com/sindresorhus/execa) for process execution. When you set "preferLocal" to true in this library "C:\node_modules\.bin" will be added to environment path. So if there is a "C:\node_modules\.bin\wmic.exe" then it will be execute by mongodb compass.
Expected Behavior/Code
C:\node_modules\.bin\wmic.exe should not be executed by mongodb compass.
Environment
Possible Solution
Set "preferLocal" to false should solve this.
Additional Context/Screenshots
I attached a stack trace in Process Monitor.
The text was updated successfully, but these errors were encountered: