This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push: new ca6e460 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63815 ca6e460 is described below commit ca6e46027ab976e88f7e581f464de9ab7746d54a Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Oct 16 14:05:16 2019 +0100 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63815 Quote CATALINA_OPTS and JAVA_OPTS when used to prevent expansion of *. --- bin/catalina.sh | 16 ++++++++-------- bin/daemon.sh | 4 ++-- bin/tool-wrapper.sh | 2 +- webapps/docs/changelog.xml | 7 +++++++ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/bin/catalina.sh b/bin/catalina.sh index f873a8f..ca09baa 100755 --- a/bin/catalina.sh +++ b/bin/catalina.sh @@ -350,7 +350,7 @@ if [ "$1" = "debug" ] ; then echo "Using Security Manager" fi shift - exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \ -classpath "$CLASSPATH" \ -sourcepath "$CATALINA_HOME"/../../java \ @@ -361,7 +361,7 @@ if [ "$1" = "debug" ] ; then -Djava.io.tmpdir="$CATALINA_TMPDIR" \ org.apache.catalina.startup.Bootstrap "$@" start else - exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + exec "$_RUNJDB" "$LOGGING_CONFIG" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \ -classpath "$CLASSPATH" \ -sourcepath "$CATALINA_HOME"/../../java \ @@ -380,7 +380,7 @@ elif [ "$1" = "run" ]; then echo "Using Security Manager" fi shift - eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Djava.security.manager \ @@ -390,7 +390,7 @@ elif [ "$1" = "run" ]; then -Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ org.apache.catalina.startup.Bootstrap "$@" start else - eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + eval exec "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ @@ -448,7 +448,7 @@ elif [ "$1" = "start" ] ; then echo "Using Security Manager" fi shift - eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Djava.security.manager \ @@ -460,7 +460,7 @@ elif [ "$1" = "start" ] ; then >> "$CATALINA_OUT" 2>&1 "&" else - eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \ + eval $_NOHUP "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ @@ -513,7 +513,7 @@ elif [ "$1" = "stop" ] ; then fi fi - eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ + eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ @@ -600,7 +600,7 @@ elif [ "$1" = "stop" ] ; then elif [ "$1" = "configtest" ] ; then - eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ + eval "\"$_RUNJAVA\"" $LOGGING_MANAGER "$JAVA_OPTS" \ -D$ENDORSED_PROP="\"$JAVA_ENDORSED_DIRS\"" \ -classpath "\"$CLASSPATH\"" \ -Dcatalina.base="\"$CATALINA_BASE\"" \ diff --git a/bin/daemon.sh b/bin/daemon.sh index afa4c89..3c517ba 100755 --- a/bin/daemon.sh +++ b/bin/daemon.sh @@ -208,7 +208,7 @@ case "$1" in -outfile "&1" \ -errfile "&2" \ -classpath "$CLASSPATH" \ - "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \ + "$LOGGING_CONFIG" "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \ -Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.home="$CATALINA_HOME" \ @@ -225,7 +225,7 @@ case "$1" in -outfile "$CATALINA_OUT" \ -errfile "&1" \ -classpath "$CLASSPATH" \ - "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \ + "$LOGGING_CONFIG" "$JAVA_OPTS" "$CATALINA_OPTS" \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \ -Dcatalina.base="$CATALINA_BASE" \ -Dcatalina.home="$CATALINA_HOME" \ diff --git a/bin/tool-wrapper.sh b/bin/tool-wrapper.sh index 35d3075..4162307 100755 --- a/bin/tool-wrapper.sh +++ b/bin/tool-wrapper.sh @@ -146,7 +146,7 @@ JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLog # ----- Execute The Requested Command ----------------------------------------- -exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \ +exec "$_RUNJAVA" "$JAVA_OPTS" $TOOL_OPTS \ -D$ENDORSED_PROP="$JAVA_ENDORSED_DIRS" \ -classpath "$CLASSPATH" \ -Dcatalina.home="$CATALINA_HOME" \ diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 160ad9d..a6a0734 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -97,6 +97,13 @@ <subsection name="Other"> <changelog> <fix> + <bug>63815</bug>: Quote the use of <code>CATALINA_OPTS</code> and + <code>JAVA_OPTS</code> when used in shell scripts to avoid the expansion + of <code>*</code>. Note that any newlines present in + <code>CATALINA_OPTS</code> and/or <code>JAVA_OPTS</code> will no longer + removed. (markt) + </fix> + <fix> <bug>63826</bug>: Remove <code>commons-daemon-native.tar.gz</code> and <code>tomcat-native.tar.gz</code> from the binary zip distributions for Windows since compiled versions of those components are already --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org