Author: kkolinko Date: Tue Aug 12 11:57:52 2014 New Revision: 1617456 URL: http://svn.apache.org/r1617456 Log: Followup to fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=56829 Be more strict with executable filename on Windows (s/java/java.exe/).
When file name extension is not specified, Windows uses the value of %PATHEXT% environment variable to enumerate applicable filename extensions. On my Windows 7 its value is ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC". I think it is a bit more secure if filename is specified explicitly. There shall be no observable difference in behaviour, as .EXE is at the start of the PATHEXT list (e.g. earlier than .BAT). Modified: tomcat/trunk/bin/setclasspath.bat tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/bin/setclasspath.bat URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.bat?rev=1617456&r1=1617455&r2=1617456&view=diff ============================================================================== --- tomcat/trunk/bin/setclasspath.bat (original) +++ tomcat/trunk/bin/setclasspath.bat Tue Aug 12 11:57:52 2014 @@ -75,13 +75,13 @@ rem Don't override _RUNJAVA if the user if not "%_RUNJAVA%" == "" goto gotRunJava rem Set standard command for invoking Java. rem Also note the quoting as JRE_HOME may contain spaces. -set _RUNJAVA="%JRE_HOME%\bin\java" +set _RUNJAVA="%JRE_HOME%\bin\java.exe" :gotRunJava rem Don't override _RUNJDB if the user has set it previously rem Also note the quoting as JAVA_HOME may contain spaces. if not "%_RUNJDB%" == "" goto gotRunJdb -set _RUNJDB="%JAVA_HOME%\bin\jdb" +set _RUNJDB="%JAVA_HOME%\bin\jdb.exe" :gotRunJdb goto end Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1617456&r1=1617455&r2=1617456&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Tue Aug 12 11:57:52 2014 @@ -215,8 +215,9 @@ </add> <add> <bug>56829</bug>: Add the ability for users to define their own values - for <code>_RUNJAVA</code> and <code>_RUNJDB</code>. Based on a patch by - Neeme Praks. (markt) + for <code>_RUNJAVA</code> and <code>_RUNJDB</code> environment + variables. Be more strict with executable filename on Windows + (s/java/java.exe/). Based on a patch by Neeme Praks. (markt/kkolinko) </add> </changelog> </subsection> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org