Author: remm
Date: Tue Feb 20 16:12:18 2018
New Revision: 1824892

URL: http://svn.apache.org/viewvc?rev=1824892&view=rev
Log:
62090: Throw an IAE when trying to set a null Catalina container name.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
    tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1824892&r1=1824891&r2=1824892&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Tue Feb 20 
16:12:18 2018
@@ -498,7 +498,9 @@ public abstract class ContainerBase exte
      */
     @Override
     public void setName(String name) {
-
+        if (name == null) {
+            throw new 
IllegalArgumentException(sm.getString("containerBase.nullName"));
+        }
         String oldName = this.name;
         this.name = name;
         support.firePropertyChange("name", oldName, this.name);

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1824892&r1=1824891&r2=1824892&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Tue Feb 
20 16:12:18 2018
@@ -90,6 +90,7 @@ asyncContextImpl.requestEnded=The reques
 asyncContextImpl.response.ise=It is illegal to call getResponse() after 
complete() or any of the dispatch() methods has been called
 asyncContextImpl.noAsyncDispatcher=The dispatcher returned from the 
ServletContext does not support asynchronous dispatching
 asyncContextImpl.dispatchingStarted=Asynchronous dispatch operation has 
already been called. Additional asynchronous dispatch operation within the same 
asynchronous cycle is not allowed.
+containerBase.nullName=Container name cannot be null
 containerBase.threadedStartFailed=A child container failed during start
 containerBase.threadedStopFailed=A child container failed during stop
 containerBase.backgroundProcess.cluster=Exception processing cluster [{0}] 
background process

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1824892&r1=1824891&r2=1824892&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb 20 16:12:18 2018
@@ -66,6 +66,9 @@
         (markt)
       </fix>
       <fix>
+        <bug>62090</bug>: Null container names are not allowed. (remm)
+      </fix>
+      <fix>
         <bug>62104</bug>: Fix programmatic login regression as the
         NonLoginAuthenticator has to be set for it to work (if no login method
         is specified). (remm)



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to