dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Inheriting IFS from environment
@ 2015-12-30 17:06 Martijn Dekker
  2016-01-03 18:46 ` Gioele Barabucci
  0 siblings, 1 reply; 2+ messages in thread
From: Martijn Dekker @ 2015-12-30 17:06 UTC (permalink / raw)
  To: dash

Unlike bash, *ksh and zsh, dash allows inheriting IFS from the environment:

$ IFS=bla dash -c "x='hela hola'; echo \$x"
he  ho

This seems a bit dodgy from a security point of view. For instance, most
scripts don't bother to quote their variables in test commands such as [
$var -eq 0 ], making it possible to influence the program flow by
manipulating IFS from the outside.

- M.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-03 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 17:06 Inheriting IFS from environment Martijn Dekker
2016-01-03 18:46 ` Gioele Barabucci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).