xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45569] New: Eliminate need for user.dir grant when not using relative-catalogs
Date Tue, 05 Aug 2008 22:02:55 GMT

           Summary: Eliminate need for user.dir grant when not using
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: ecapachedev@gmail.com

When the CatalogManager configuration of relative-catalogs is false, the
catalog paths will be absolute.  When parsing the catalogs in
Catalog.parseCatalogFile, the first thing that occurs is creating a URL of the
current working directory, which requires a grant to the "user.dir"
PropertyPermission.  Creating this URL is unnecessary when an absolute path to
the catalog is passed in and the grant would also be unnecessary.

To alleviate this condition, a URL can be attempted to be made from the
fileName first and if a MalformedURLException occurs, treat it as a relative
path.  In essence:

try {
  base = new URL(fixSlashes(fileName));
} catch (MalformedURLException mue) {

Alternatively, there can be a mode set or passed in to treat the fileName

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message