bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash brace issues (similar to shellshock)


From: Pierre Gaston
Subject: Re: bash brace issues (similar to shellshock)
Date: Mon, 6 Aug 2018 19:13:41 +0300

On Mon, Aug 6, 2018 at 4:32 PM, martins dada <address@hidden>
wrote:

> Find attached details regarding bash brace issues. King regards.
>

you are simply assigning (){ to a temporary environment before running the
command

$  n=(){ bash -c 'echo $n'
(){

just like:

a=foo bash -c 'echo $a'

I'd agree that I would not expect bash to accept this without quotes,
but it does not allow to execute arbitrary commands like shellshock did.
At least your examples don't show this.

Your third example is best understood if you move the redirection at the
end:

n=(){ a= date >\ echo

redirection can appear anywhere around the command
As your wrote it, it looks funny but it's not different from  "date > file"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]