DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=43117>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=43117 Summary: Dangerousness of workDir setting on Context Product: Tomcat 6 Version: 6.0.14 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I'd like to point out the dangerousness of workDir setting on Context. If workDir is an empty string, i.e. workDir=AA, then workDir will be set as CATALINA_HOME. Therefore if application will be reloaded, then the files in CATALINA_HOME will be deleted. I know this problem is caused by wrong configuration, but it is too dangerous, anyway. I propose a patch. Index: /trunk/java/org/apache/catalina/core/StandardContext.java =================================================================== --- /trunk/java/org/apache/catalina/core/StandardContext.java (revision 565643) +++ /trunk/java/org/apache/catalina/core/StandardContext.java (working copy) @@ -5006,7 +5006,7 @@ // Acquire (or calculate) the work directory path String workDir = getWorkDir(); - if (workDir == null) { + if (workDir == null || workDir.length() == 0) { // Retrieve our parent (normally a host) name String hostName = null; -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]