ASF Bugzilla – Attachment 29050 Details for
Bug 53531
ExpandWar.expand does not check the return value of File.mkdir and File.mkdirs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 6.0.x against r1359053
53531.diff (text/plain), 1.92 KB, created by
Christopher Schultz
on 2012-07-11 19:36:07 UTC
(
hide
)
Description:
Patch for 6.0.x against r1359053
Filename:
MIME Type:
Creator:
Christopher Schultz
Created:
2012-07-11 19:36:07 UTC
Size:
1.92 KB
patch
obsolete
>Index: java/org/apache/catalina/startup/ExpandWar.java >=================================================================== >--- java/org/apache/catalina/startup/ExpandWar.java (revision 1360366) >+++ java/org/apache/catalina/startup/ExpandWar.java (working copy) >@@ -132,7 +132,8 @@ > } > > // 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 +163,9 @@ > 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; >Index: java/org/apache/catalina/startup/LocalStrings.properties >=================================================================== >--- java/org/apache/catalina/startup/LocalStrings.properties (revision 1360366) >+++ java/org/apache/catalina/startup/LocalStrings.properties (working copy) >@@ -61,6 +61,7 @@ > expandWar.copy=Error copying {0} to {1} > 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}] >+expandWar.createFailed=Unable to create the directory [{0}] > hostConfig.appBase=Application base directory {0} does not exist > hostConfig.canonicalizing=Error delete redeploy resources from context [{0}] > hostConfig.cce=Lifecycle event data object {0} is not a Host
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53531
:
29045
| 29050 |
29212