Overview
| Artifact ID: | b25e1bc5cc7e5c697372e1e74f1b2d3eb1eba5008a542644c5eafaa454c2a488 |
|---|---|
| Ticket: | fb2fa9b3f6467ee66f543ec904e37aa8508f2fb1
exec broken for command having windows environment variables |
| User & Date: | sebres on 2023-10-27 11:04:23 |
Changes
- icomment:
Here you go - branch [https://core.tcl-lang.org/tcl/vdiff?from=7ed548b6b59bb496&to=fix-fb2fa9b3f6--percent-subst-regr|fix-fb2fa9b3f6--percent-subst-regr] fixes the regression by %-char subst for execution of comspec/batch-files (restores old behaviour by %-escape). However as already said (and how the warning in [ea3b6d6792] says) - there is a TODO now: since it'd reopen a injection-vector by execution of command processor/batch-files as described below (unexpected tripple/double quote issue), <code>exec</code> as well as <code>open |...</code> should get new option for safe escape (or no .bat/.cmd/comspec execution with arguments from foreign input can be considered as safe without extra parameters validation). Previous fix has been still retained (ifdef-ed by <code>TCL_WIN_PIPE_FULLESC</code>) for future usage with new option (if it gets implemented at some point) or for the people like me which prefer the safe escape to the backwards compat issues.
- login: "sebres"
- mimetype: "text/x-fossil-wiki"