tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Lamb <p...@oil-law.com>
Subject FileUtils.safepath() bug
Date Fri, 23 Jun 2000 19:56:17 GMT
I started having problems with contexts in tomcat where the path=""
yesterday and tracked it down today to the changes in safepath.

The problem seems to lies here:

    canPath=new File(realPath).getCanonicalPath();

    ...

    if (File.separatorChar  == '\\') {
        // On Windows check ignore case....
        if(!realPath.equalsIgnoreCase(canPath)) {
            return null;
        }
    }

The realPath might be something like "D:\working\website\webapps\extranet\"
but the canPath is "D:\working\wesbsite\webapps\extranet" (without a
trailing "\").

Thanks,

Paul Lamb

Mime
View raw message