Overview
| Artifact ID: | 56eecd1e46b63256f1089fe0fce657e8f78cd99b1325314d6310538628efd836 |
|---|---|
| Ticket: | fb2fa9b3f6467ee66f543ec904e37aa8508f2fb1
exec broken for command having windows environment variables |
| User & Date: | juliannoble2 on 2023-11-02 17:13:14 |
Changes
- icomment:
After playing around with it, !env! and the delayed expansion flag /v are actually the safest way to access variables as they don't seem to be able to escape. use of !var! definitely shouldn't be hindered in my opinion. The issues are pretty complicated - but note that powershell and cmd.exe without Tcl involvement show the same issues, so it's arguable we shouldn't be limiting Tcl too much here anyway. I will post some more info on the core list - but I have developed a 'runcmd' proof of concept using just twapi and script, which quotes with the ^ (caret character) and gives a much more acceptable balance of features vs risk I feel. To use %var% completely safely if you don't trust your environment variables would require require Tcl to scan the values - which I don't think is practical/desirable.
- login: "juliannoble2"
- mimetype: "text/plain"