Author: kkolinko Date: Tue Aug 12 12:08:57 2014 New Revision: 1617458 URL: http://svn.apache.org/r1617458 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). It is merge of r1617456 from tomcat/trunk. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/bin/setclasspath.bat tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1617456 Modified: tomcat/tc7.0.x/trunk/bin/setclasspath.bat URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/bin/setclasspath.bat?rev=1617458&r1=1617457&r2=1617458&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/bin/setclasspath.bat (original) +++ tomcat/tc7.0.x/trunk/bin/setclasspath.bat Tue Aug 12 12:08:57 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/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1617458&r1=1617457&r2=1617458&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Aug 12 12:08:57 2014 @@ -141,8 +141,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