I originally thought that this bug affected only fish 3.0 with the changes to brace expansion that imbued it with significantly more functionality and flexibility, but it turns out that even fish 2.7.1 is affected by this bug.
~> set -l tokens "foo,bar"
~> printf "'%s' " {$tokens}
'foo,bar'
~> printf "'%s' " {(echo $tokens)}
'foo' 'bar'
The output of a process should never be evaluated in this fashion, as this poses a major security risk.
I originally thought that this bug affected only fish 3.0 with the changes to brace expansion that imbued it with significantly more functionality and flexibility, but it turns out that even fish 2.7.1 is affected by this bug.
The output of a process should never be evaluated in this fashion, as this poses a major security risk.