Re: temp env allows variables that look like array subscripts
From:
Chet Ramey
Subject:
Re: temp env allows variables that look like array subscripts
Date:
Tue, 11 Dec 2018 15:07:44 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
On 12/8/18 11:45 PM, Grisha Levit wrote:
> FWIW, namerefs in the temporary environment bypass the implemented checks:
>
> $ declare -n ref=var[0]
> $ ref=X printenv 'var[0]'
> X
Thanks for the report. We should follow namerefs, but in this case not
allow nameref values that aren't valid shell identifiers. I will fix this
for the next devel branch push.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/