Skip to content
Tcl Source Code Artifact [fb1ca4ff9a]
Login

Artifact [fb1ca4ff9a]

Artifact fb1ca4ff9a736a8eb156f72ad6d658dce408387f04f7868693219be401bdd901:

Ticket change [fb1ca4ff9a] - Ticket [344b1a0c0f0e2fda|344b1a0c0f] <i>exec on Windows broken when &#39;%&#39; is used</i> status still Open with 3 other changes by sebres on 2019-01-15 18:43:49.
D 2019-01-15T18:43:49.613
J icomment Confirmed.\r\n\r\nBasically,\sthis\sis\snot\sa\sbug,\sbut\sfeature\s(I\swould\ssay,\sI'm\sblame\sfor\sthis)\sto\savoid\swindows\svulnerable\shandling\sby\s(un)escape\sof\sthe\sparameters,\ssee\s[21b0629c81].\r\n\r\nJust\sa\sbit\sincompatible\sfeature\sin\sexactly\sthis\scase.\r\n\r\nThe\ssubstitution\sof\ssystem\svariables\susing\spercent-char\swas\snowhere\sdescribed\sresp.\snot\sdocumented\sin\sthe\sexec-manual\s(still\sworse\sit\sis\sunclear\sin\sdocumentation\sof\swindows\scommand\sprocessor\stoo).\sFurthermore\sit\scould\scause\sunexpected\sor\seven\svulnerable\sbehavior\sif\scalling\sbatch-files,\sor\sexecutable\sfrom\sthere.\r\n\r\nPossible\ssolutions:<br/>\r\n-\srestore\sbackwards-compatibility\sfor\scall\sof\sthe\scommand-processor;<br/>\r\n-\sspecial\soption\slike\s--safe\sor\s--unsafe\sto\suse\s(or\savoid)\ssafe\sescaping\sat\sall;<br/>\r\n-\srewrite\sthe\scode\sin\ssqlite\slike:\r\n<pre\sstyle="padding-left:10pt">\r\n<b\sstyle="color:red">-\sreturn\s[string\smap\s[list\s\\\\\s/]\s\\\r\n-\s\s\s\s\s\s\s\s\s\s\s\s[string\strim\s[exec\s--\s$::env(ComSpec)\s/c\secho\s%CD%]]]</b>\r\n<b\sstyle="color:green">+\sreturn\s[file\snormalize\s[pwd]]</b>\r\n</pre>\r\nOr\sjust\sremove\sthis\sworkaround\scompletely,\sbecause\spwd\salways\sreturn\snormalized\spath\snow,\sso\sthis\sstrange\sattempt\sto\ssolve\s"case-mismatch\sissues\son\swindows"\sis\snot\sexpected\sanymore.\r\n\r\nI'm\saware\sof\sthe\scertain\sincompatibility\shere,\sand\sbecause\sthe\sfix\s[21b0629c81]\sis\sanyway\sincomplete\s(see\smy\slast\scomment\sthere),\sso\sI'm\sall\sears\sfor\sthe\ssuggestions\sor\sproposals\show\swe\scould\ssolve\sthis.
J login sebres
J mimetype text/x-fossil-wiki
K 344b1a0c0f0e2fda1e4ad6520cbf5e0af35eb332
U sebres
Z 40e695c0550646f781e61203c5415e61