Skip to content

Commas in process output are used as separators in brace expansion #5048

@mqudsi

Description

@mqudsi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedrelease notesSomething that is or should be mentioned in the release notes

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions