Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Report - execute exe from unexpected path #2066

Closed
houjingyi233 opened this issue Nov 23, 2020 · 2 comments
Closed

Bug Report - execute exe from unexpected path #2066

houjingyi233 opened this issue Nov 23, 2020 · 2 comments

Comments

@houjingyi233
Copy link

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

  • OS: windows 10

Possible Solution

Set "preferLocal" to false should solve this.

Additional Context/Screenshots

I attached a stack trace in Process Monitor.

stack-trace

@Anemy
Copy link
Member

Anemy commented Dec 14, 2020

Hi @houjingyi233 - thanks for reporting. This does look like a bug.
We're tracking this here in jira: https://jira.mongodb.org/browse/COMPASS-4510?filter=-2

@Anemy
Copy link
Member

Anemy commented Dec 15, 2020

Closing this as duplicate of #2061

@Anemy Anemy closed this as completed Dec 15, 2020
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

No branches or pull requests

2 participants