On Mon, Jan 05, 2015 at 08:45:41AM -0500, Greg Wooledge wrote:
> No, the tricky part of indirection with arrays is avoiding code injection
> exploits. The only way you can do indirection with arrays is with eval,
> or with constructs that are just eval in disguise (like Bash's declare -n
> syntax).
Ah, right! I meant tricky just to make the original request work, you have to
clone the array and all that. I didn't even bother to mention this.
> And now I can't even remember whether bash's [[ command uses the C locale
> for A-Z ranges, or the user's locale. If it's the user's locale then
> this has ANOTHER vulnerability. :(
shopt -s globasciiranges
Thanks for mentioning this though.