Author: markt Date: Thu Oct 10 11:04:41 2013 New Revision: 1530916 URL: http://svn.apache.org/r1530916 Log: Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55620 Prevent Tomcat from starting on Linux when CATALINA_HOME or CATALINA_BASE contains a colon
Modified: tomcat/trunk/bin/catalina.sh Modified: tomcat/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1530916&r1=1530915&r2=1530916&view=diff ============================================================================== --- tomcat/trunk/bin/catalina.sh (original) +++ tomcat/trunk/bin/catalina.sh Thu Oct 10 11:04:41 2013 @@ -129,6 +129,20 @@ PRGDIR=`dirname "$PRG"` # Copy CATALINA_BASE from CATALINA_HOME if not already set [ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME" +# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon +# as this is used as the separator in the classpath and Java provides no +# mechanism for escaping if the same character appears in the path. +case $CATALINA_HOME in + *:*) echo "Using CATALINA_HOME: $CATALINA_HOME"; + echo "Unable to start as CATALINA_HOME contains a colon (:) character"; + exit 1; +esac +case $CATALINA_BASE in + *:*) echo "Using CATALINA_BASE: $CATALINA_BASE"; + echo "Unable to start as CATALINA_BASE contains a colon (:) character"; + exit 1; +esac + # Ensure that any user defined CLASSPATH variables are not used on startup, # but allow them to be specified in setenv.sh, in rare case when it is needed. CLASSPATH= --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org