Avoid eval, shell-injection via JAVA_OPTS or JENKINS_OPTS
The intent of using eval when processing JAVA_OPTS or JENKINS_OPTS is to allow arguments with spaces to be passed through and parsed without the bugs given in [BashFAQ #50](http://mywiki.wooledge.org/BashFAQ/050). By using `eval`, however, the issues discussed in [BashFAQ #48](http://mywiki.wooledge.org/BashFAQ/048) are introduced.
Strings containing whitespace can be safely processed with `xargs`, which -- when not used with the non-POSIX extensions `-0` or `-d` -- follows shell quoting conventions in splitting its input stream into arguments.
1 file changed