markt 2004/02/13 12:11:12 Modified: catalina/src/share/org/apache/catalina/servlets WebdavServlet.java Log: Fix bug 26906. - The destination path needs to be normalised after the protocol and host has been removed (if present). - Reported by rsudharsan - Ported from TC5 Revision Changes Path 1.32 +9 -6 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java Index: WebdavServlet.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/WebdavServlet.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- WebdavServlet.java 22 Dec 2003 12:38:54 -0000 1.31 +++ WebdavServlet.java 13 Feb 2004 20:11:12 -0000 1.32 @@ -1504,8 +1504,8 @@ return false; } - destinationPath = - normalize(RequestUtil.URLDecode(destinationPath, "UTF8")); + // Remove url encoding from destination + destinationPath = RequestUtil.URLDecode(destinationPath, "UTF8"); int protocolIndex = destinationPath.indexOf("://"); if (protocolIndex >= 0) { @@ -1539,6 +1539,9 @@ } } } + + // Normalise destination path (remove '.' and '..') + destinationPath = normalize(destinationPath); String contextPath = req.getContextPath(); if ((contextPath != null) &&
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]