Skip to content

Commit

Permalink
Use %COMSPEC% not "cmd" to prevent hijacking. Fixes #5254 (#5255)
Browse files Browse the repository at this point in the history
* Use %COMSPEC% not "cmd" to prevent hijacking. Fixes #5254

* Update aliases.py

* Update aliases.py

---------

Co-authored-by: Andy Kipp <anki-code@users.noreply.github.com>
  • Loading branch information
JamesParrott and anki-code committed Jan 16, 2024
1 parent 235e599 commit 2db06e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xonsh/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def make_default_aliases():
"vol",
}
for alias in windows_cmd_aliases:
default_aliases[alias] = ["cmd", "/c", alias]
default_aliases[alias] = [os.getenv("COMSPEC"), "/c", alias]
default_aliases["call"] = ["source-cmd"]
default_aliases["source-bat"] = ["source-cmd"]
default_aliases["clear"] = "cls"
Expand Down

0 comments on commit 2db06e7

Please sign in to comment.