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
Nash is using os/exec.LookPath of Go to look for paths of commands, but this implementation interprets "" (empty path) as "." in the variable $PATH and this could lead to unexpected behaviours and/or malicious code execution.
Better to create our own LookPath implementation being explicit about path names (ignoring empty paths on it).
The text was updated successfully, but these errors were encountered:
There's more oddities that I just found... The LookPath implementation for windows uses the "." implicitly also (but there's no way to avoid in this case). This is weird and make nash works differently across operating systems.
When I saw os/exec.LookPath in godoc for the first time I thought it had the same semantics in all OS.. but no.
Nash is using
os/exec.LookPath
of Go to look for paths of commands, but this implementation interprets "" (empty path) as "." in the variable$PATH
and this could lead to unexpected behaviours and/or malicious code execution.Better to create our own LookPath implementation being explicit about path names (ignoring empty paths on it).
The text was updated successfully, but these errors were encountered: