Author: markt
Date: Tue Jan 8 21:43:23 2013
New Revision: 1430553
URL: http://svn.apache.org/viewvc?rev=1430553&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54382
Avoid NPE with an empty SSI directive
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/ssi/SSIProcessor.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1430550
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ssi/SSIProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ssi/SSIProcessor.java?rev=1430553&r1=1430552&r2=1430553&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ssi/SSIProcessor.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ssi/SSIProcessor.java Tue Jan
8 21:43:23 2013
@@ -309,11 +309,11 @@ public class SSIProcessor {
break;
}
}
- String command = null;
- if (firstLetter != -1) {
- command = cmd.substring(firstLetter, lastLetter + 1);
+ if (firstLetter == -1) {
+ return "";
+ } else {
+ return cmd.substring(firstLetter, lastLetter + 1);
}
- return command;
}
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=1430553&r1=1430552&r2=1430553&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jan 8 21:43:23 2013
@@ -125,6 +125,10 @@
<bug>54381</bug>: Add support for receiving WebSocket pong messages.
(markt)
</add>
+ <fix>
+ <bug>54382</bug>: Fix NPE when SSI processing is enabled and an empty
+ SSI directive is present. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]