tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1392228 - in /tomcat/tc5.5.x/trunk: ./ container/catalina/src/share/org/apache/catalina/startup/ container/webapps/docs/
Date Mon, 01 Oct 2012 08:24:05 GMT
Author: markt
Date: Mon Oct  1 08:24:04 2012
New Revision: 1392228

URL: http://svn.apache.org/viewvc?rev=1392228&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53531
ExpandWar.expand does not check the return value of File.mkdirs.
Provide better message when a war file cannot be unpacked due to failure to create a directory.
Fix missing message argument in ContextConfig.init().

Modified:
    tomcat/tc5.5.x/trunk/STATUS.txt
    tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
    tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ExpandWar.java
    tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
    tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml

Modified: tomcat/tc5.5.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1392228&r1=1392227&r2=1392228&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/STATUS.txt (original)
+++ tomcat/tc5.5.x/trunk/STATUS.txt Mon Oct  1 08:24:04 2012
@@ -66,15 +66,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: kkolinko, markt
   -1:
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53531
-  ExpandWar.expand does not check the return value of File.mkdirs.
-  Provide better message when a war file cannot be unpacked due to failure
-  to create a directory. Fix missing message argument in ContextConfig.init().
-  kkolinko: Updated patch:
-  https://issues.apache.org/bugzilla/attachment.cgi?id=29212
-  +1: schultz, kkolinko, markt
-  -1:
-
 * Various DIGEST improvements ported from Tomcat 7
   http://people.apache.org/~markt/patches/2012-08-28-digest-tc5.patch
   +1: markt, kkolinko

Modified: tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=1392228&r1=1392227&r2=1392228&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
(original)
+++ tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Mon Oct  1 08:24:04 2012
@@ -998,7 +998,8 @@ public class ContextConfig
         try {
             fixDocBase();
         } catch (IOException e) {
-            log.error(sm.getString("contextConfig.fixDocBase"), e);
+            log.error(sm.getString(
+                    "contextConfig.fixDocBase", context.getPath()), e);
         }
         
     }

Modified: tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ExpandWar.java
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ExpandWar.java?rev=1392228&r1=1392227&r2=1392228&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ExpandWar.java
(original)
+++ tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/ExpandWar.java
Mon Oct  1 08:24:04 2012
@@ -132,7 +132,9 @@ public class ExpandWar {
         }
 
         // Create the new document base directory
-        docBase.mkdir();
+        if(!docBase.mkdir() && !docBase.isDirectory())
+            throw new IOException(
+                    sm.getString("expandWar.createFailed", docBase));
 
         // Expand the WAR into the new document base directory
         String canonicalDocBasePrefix = docBase.getCanonicalPath();
@@ -162,7 +164,9 @@ public class ExpandWar {
                 if (last >= 0) {
                     File parent = new File(docBase,
                                            name.substring(0, last));
-                    parent.mkdirs();
+                    if(!parent.mkdirs() && !parent.isDirectory())
+                        throw new IOException(
+                                sm.getString("expandWar.createFailed", parent));
                 }
                 if (name.endsWith("/")) {
                     continue;
@@ -192,7 +196,7 @@ public class ExpandWar {
                 try {
                     input.close();
                 } catch (Throwable t) {
-                    ;
+                    // Ignore
                 }
                 input = null;
             }
@@ -200,7 +204,7 @@ public class ExpandWar {
                 try {
                     jarFile.close();
                 } catch (Throwable t) {
-                    ;
+                    // Ignore
                 }
                 jarFile = null;
             }

Modified: tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties?rev=1392228&r1=1392227&r2=1392228&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
(original)
+++ tomcat/tc5.5.x/trunk/container/catalina/src/share/org/apache/catalina/startup/LocalStrings.properties
Mon Oct  1 08:24:04 2012
@@ -57,6 +57,7 @@ engineConfig.cce=Lifecycle event data ob
 engineConfig.start=EngineConfig: Processing START
 engineConfig.stop=EngineConfig: Processing STOP
 expandWar.copy=Error copying {0} to {1}
+expandWar.createFailed=Unable to create the directory [{0}]
 expandWar.deleteFailed=[{0}] could not be completely deleted. The presence of the remaining
files may cause problems
 expandWar.illegalPath=The archive [{0}] is malformed and will be ignored: an entry contains
an illegal path [{1}]
 hostConfig.appBase=Application base directory {0} does not exist

Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml?rev=1392228&r1=1392227&r2=1392228&view=diff
==============================================================================
--- tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml (original)
+++ tomcat/tc5.5.x/trunk/container/webapps/docs/changelog.xml Mon Oct  1 08:24:04 2012
@@ -45,6 +45,12 @@
       <update>
         Update to Apache Commons Daemon 1.0.9. (markt)
       </update>
+      <fix>
+        Various improvements to the DIGEST authenticator including
+        <bug>52954</bug>, the disabling caching of an authenticated user in the
+        session by default, tracking server rather than client nonces and better
+        handling of stale nonce values. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Catalina">
@@ -58,6 +64,10 @@
         entropy to initialize random numbers generator in session manager. Based
         on a proposal by Andras Rozsa. (kkolinko/jim)
       </fix>
+      <fix>
+        <bug>53531</bug>: Better checking and improved error messages for
+        directory creation during automatic deployment. (schultz/kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message