commit 1c4fb136dbad762c9c4350ee79c3474ae8037587
Author: Anders Kaseorg <
address@hidden>
Date: Fri Sep 27 06:23:55 2013 -0400
submodule foreach: skip eval for more than one argument
'eval "$@"' creates an extra layer of shell interpretation, which is
probably not expected by a user who passes multiple arguments to git
submodule foreach:
$ git grep "'"
[searches for single quotes]
$ git submodule foreach git grep "'"
Entering '[submodule]'
/usr/lib/git-core/git-submodule: 1: eval: Syntax error: Unterminated quoted string
Stopping at '[submodule]'; script returned non-zero status.
To fix this, if the user passes more than one argument, execute "$@"
directly instead of passing it to eval.
Examples:
* Typical usage when adding an extra level of quoting is to pass a
single argument representing the entire command to be passed to the
shell. This doesn't change that.
* One can imagine someone feeding untrusted input as an argument:
git submodule foreach git grep "$variable"
That currently results in a nonobvious shell code injection
vulnerability. Executing the command named by the arguments
directly, as in this patch, fixes it.
Signed-off-by: Anders Kaseorg <
address@hidden>
Acked-by: Johan Herland <
address@hidden>
Signed-off-by: Jonathan Nieder <
address@hidden>
Hence, this seems to me as a feature, not a bug in Git. Maybe, automake needs to fix its scripts accordingly? Because the issue with `make check` was introduced through this specific commit.
Do let me know if I can provide any more help.
Also, I am not sunscribed to this mailing list, hence, please ensure to leave my email in the CC list.