Closed
Description
In os/exec.LookPath use Windows function NeedCurrentDirectoryForExePathW
to check if the environment is hardened to protect against resolution of command path in the current directory.
Note that this proposal is different from just looking at the existence of a NoDefaultCurrentDirectoryInExePath
environment variable because the function doesn't just look in the process environment variables but might also look in registry settings.
This is related to:
- os/exec: return error when PATH lookup would use current directory #43724: return error when PATH lookup would use current directory
- proposal: os/exec: use LookPathAbs by default #42950: use LookPathAbs by default
Credit goes to @KalleOlaviNiemitalo for his/her comment in #38736.
Metadata
Metadata
Assignees
Type
Projects
Status
Done