View | Details | Raw Unified | Return to bug 62498
Collapse All | Expand All

(-)java/org/apache/naming/resources/FileDirContext.java (-2 / +6 lines)
Lines 880-887 Link Here
880
        //
880
        //
881
        // absPath is normalized so canPath needs to be normalized as well
881
        // absPath is normalized so canPath needs to be normalized as well
882
        // Can't normalize canPath earlier as canonicalBase is not normalized
882
        // Can't normalize canPath earlier as canonicalBase is not normalized
883
        if (canPath.length() > 0) {
883
        //
884
            canPath = normalize(canPath);
884
        // normalize will always prepend a leading slash, so even an empty String
885
        // will result in "/"
886
        canPath = normalize(canPath);
887
        if (absPath.length() == 0) { // normalize will never return an empty string
888
            absPath = "/"; // so absPath needs to be fixed as well
885
        }
889
        }
886
        if (!canPath.equals(absPath)) {
890
        if (!canPath.equals(absPath)) {
887
            return null;
891
            return null;

Return to bug 62498