You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/09/16 18:09:36 UTC
DO NOT REPLY [Bug 31264] New: -
Manager webapp uploads WAR, then overwrites it
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=31264>.
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=31264
Manager webapp uploads WAR, then overwrites it
Summary: Manager webapp uploads WAR, then overwrites it
Product: Tomcat 5
Version: 5.5.1
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Minor
Priority: Other
Component: Webapps:Manager
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: gadbois@computer.org
The manager webapp doPut() processing (which is what the Ant manager tasks use),
extracts a war file from the HTTP request, saves it to appBase, and then tries
to copy the war on to itself, resulting in a zero-length war file. The code
that does this is in org.apache.catalina.manager.ManagerServlet line 642 in
method deploy(PrintWriter, String, String, boolean, HttpServletRequest):
if (!isServiced(path)) {
addServiced(path);
---> copy(localWar, new File(getAppBase(), basename + ".war"));
check(path);
removeServiced(path);
}
In the call to copy(), the source and destination files are the same.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org