https://bz.apache.org/bugzilla/show_bug.cgi?id=62498

            Bug ID: 62498
           Summary: FileDirContext validate not working properly for
                    directories
           Product: Tomcat 7
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: m.droess...@handelsblattgroup.com
  Target Milestone: ---

Created attachment 35993
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35993&action=edit
Patch

We encounter weird errors with our webapp since tomcat 7.0.82

A change in org.apache.naming.resources.FileDirContext from Mark Thomas at
28.09.17 at 13:54
introduced the wrong behaviour due to difference in how constructors of
java.io.File work.

e.g.:
File f = new File("/tmp/");

is not the same as:
File fp = new File("/tmp");
File f = new File(f, "/");


Thus, the changed check in the validate-method can result in absPath = "/" and
canPath = "" ...and the check for equals fails, although its the same path!

I attached a patch to reverse the handling of absPath and canPath.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to