<i>exec broken for command having windows environment variables</i> status still Open with 3 other changes
by
.
D 2023-10-27T08:33:41.265
J icomment Well,\sthe\sreason\swhy\sI\scalled\sit\svulnerability\sis\sthat\sas\salready\ssaid\sin\s[344b1a0c0]\sas\swell\sas\sby\sfixing\sin\s[21b0629c81]\s-\swindows\sdoesn't\sreally\shave\scorrect\sway\sto\sescape\squotes\sby\scalling\sof\scommand\sprocessor,\sand\sbecause\ssubstitution\sof\s<code>%var%</code>\smay\sinsert\squotes\stoo,\salthough\sthey\sare\smostly\spaired,\sthe\spreviously\sescaped\sstring\smay\sbecome\sextra\sdouble/triple\squotes,\swhich\scould\stopple\sthe\swhole\sescape,\ssometimes\sto\scompletely\sunescaped\sparameters\s(and\sso\scan\sopen\sa\svector\sfor\san\sinject,\sbecause\scan\sinvoke\scommands\safter\spipe\sor\sampersand\schars\sin\ssome\sparameter).\r\n\r\nSure\sit\sis\sa\sclear\sregression\sin\ssense\sof\sbackwards\scompatibility,\sjust\ssince\sthere\sis\sno\sway\sto\sfix\sit\sproperly\swithout\sto\sintroduce\ssome\snew\soptions\sfor\s<code>exec</code>,\slike\s<code>-shellescape</code>\sor\s<code>-unescape</code>\s(expected\sTIP)\setc,\sit\swas\sfixed\sin\sthis\sway.\r\n\r\nFeel\sfree\sto\srevert\sit\sin\spart\saffecting\s<code>%</code>-escape,\sjust\sas\salready\ssaid\sit\swould\sbe\sa\shalf\ssolution\sthen.\r\n\r\nHowever\sI\sdon't\srealy\sunderstand\swhy\ssomeone'd\sneed\sto\ssubst\s<code>%var%</code>\sin\sthe\scommand\sprocessor,\swhere\sit\sis\spretty\ssimple\swith\s<code>$::env(var)</code>\sby\sinvokation\sof\s<code>exec</code>.
J login sebres
J mimetype text/x-fossil-wiki
K fb2fa9b3f6467ee66f543ec904e37aa8508f2fb1
U sebres
Z 914ec299f9f4ca8f40df9bbc5db38364